Skip to main content

Discord

Messaging and sheets

The Discord connector posts messages to a Discord channel through an incoming webhook or a bot token from the Discord developer portal.

When to use it​

  • A run posts into a Discord channel.
  • You post replies into an existing thread, with a bot token.

This connector sends messages only.

What you need​

One of these:

  • A webhook URL. In Discord, open the channel's settings and go to Integrations > Webhooks.
  • A bot token from your Discord application, the bot added to your server with permission to send messages, and the channel ID.

Connect​

The connection form lists its steps on the left. Open any step from that list. The Environments step holds the values that differ per environment.

Test connection is in the form footer. Beside it, Test against picks Base, the connection as saved, or an environment, whose values are applied first.

FieldStepWhat to enter
Incoming Webhook URLAuthenticationSuch as https://discord.com/api/webhooks/....
Bot Token (Optional)AuthenticationA static bot token from the developer portal.
Channel IDConnectionRequired when a bot token is set.
Default Bot Name (Optional)OptionsThe sender name, such as DataLug.
Default Avatar URL (Optional)OptionsAn image URL for the sender.

Set at least one of the webhook URL and the bot token. When both are set, the bot token is used. A bot token does not expire and has no sign-in step.

Stored secrets are never sent back to the browser.

Supported operations​

Post Message on a Notification node. The action sets the Notification type, the Sender name, an optional Thread ID and the Message. A thread ID posts into that existing thread, with a bot token.

The message is a template. It takes the same placeholders as an email, such as {{sys.execution.id}}, {{vars.exec.myKey}} and {{sample.firstRow.field}}.

Limits​

  • Messages through one connection to one channel are sent at most one per second. Extra messages wait their turn.
  • A thread ID applies to the bot token path. A new thread cannot be created.

Troubleshooting​

  • Test connection passes but nothing arrives. The webhook belongs to a different channel, or the channel ID is wrong. Check the channel ID on the Connection step.
  • The bot path returns 403. The bot is not in the server or cannot send messages in that channel. Add it, or grant Send Messages on the channel.
  • The message is sent but looks wrong. Build it with a Message node first and preview it there. The connector sends what it is given.