Skip to content

Discord ​

Post to your Discord servers’ channels through your bot: an alert, a summary, an email’s attachments, a thread.

A Discord connection lets the Discord node post a message — with or without attachments — to a server’s channel, or start a thread there, on behalf of your bot.

The connection holds the bot token, encrypted at rest and set by the server in the Authorization: Bot … header at call time.

At a glance ​

  • Identifier: discord
  • Family: Service
  • Set up by: A member (personal) or an administrator (shared with the organisation)
  • Authentication: API key or token
  • Credential type: service:discord
  • Official API documentation: https://docs.discord.com/developers/resources/message
  • API base URL: https://discord.com/api/v10
  • Rate limit applied by Loop & Roll: 5 requests per 5 seconds and per connection; up to 3 attempts on a 429 or a 5xx
  • Connection test: Yes

Step by step ​

The same steps are shown in the connection form of the app.

  1. On discord.com/developers/applications, create an application, then open the “Bot” tab and click “Reset Token” to get its token.
  2. In “OAuth2 → URL Generator”, tick “bot” and the “Send Messages” permission, open the generated URL and invite the bot to your server.
  3. Paste the bot token below.

Connection fields ​

FieldKindRequiredNotes
Bot token (botToken)Secret — never shown againYes

Before you start ​

  • The bot must be invited to the server (OAuth2 → URL Generator, bot scope, Send Messages permission). A bot that is not on the server sees neither the server nor its channels.
  • Discord channel webhooks are not used: their URL carries the secret in its path.

Add the connection ​

  1. Open Connections. In the Third-party services section, find the Discord card and click Connect.
  2. Paste the bot token, then click Create connection.
  3. Click Configure, then Test connection: the test calls GET /users/@me and shows the bot’s name.

Calls used ​

ActionDiscord call
Post a messagePOST /channels/{id}/messages (multipart payload_json + files[n] with attachments)
Start a threadPOST /channels/{id}/threads, then the first message in the thread
ListsGET /users/@me/guilds, GET /guilds/{id}/channels

Nodes that use this connection ​

Loop & Roll — the workflow builder for email.