nœuds / builtin / integration
Discord
Integrate with Discord: post messages and rich embeds via a webhook, or read channels and messages with a bot token.
Ce contenu n’est pas encore disponible dans votre langue.
Post messages and rich embeds to a Discord channel through a webhook, or read channels and messages and add reactions with a bot.
What it does
Section titled “What it does”The Discord node has two ways in, depending on the Resource:
- Webhook → Send posts to the one channel a webhook belongs to. You can send plain Message text, a rich embed (title, link, description, thumbnail image), or both. Username changes the sender name for this message only.
- Channel and Message use a bot: get a channel’s details, list a server’s channels, read a channel’s latest messages (50 by default, up to 100), get one message, or add a reaction.
The bot cannot send messages; use Webhook → Send for that.
When to use it
Section titled “When to use it”- Report a page change, price drop or failed check to a team channel.
- Post a card with a title, link and screenshot thumbnail using the embed fields.
- Read a channel’s recent messages and summarize them with an AI node.
- Mark a message as handled by reacting with ✅.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| Credential (obligatoire) | Credential | The Discord credential. For Webhook operations store the webhook URL (it is a secret — anyone with it can post to that channel); for Channel/Message operations store a bot token. |
6 choix · choisissez Resource and Operation pour voir ses réglages
Réglages de Webhook · Send
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Message | Text | The message text to post (optional if an embed is provided). |
| Username | Text | Override the webhook display name for this message. |
| Embed Title | Text | Title of the rich embed. |
| Embed URL | Text | URL the embed title links to. |
| Embed Description | Text | Body text of the rich embed (Markdown supported). |
| Embed Thumbnail URL | Text | Image URL shown as the embed thumbnail (e.g. a screenshot). |
Réglages de Channel · Get
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Channel ID (obligatoire) | Text | The Discord channel ID. |
Réglages de Channel · List
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Server (Guild) ID (obligatoire) | Text | The Discord server (guild) ID. |
Réglages de Channel · Get messages
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Channel ID (obligatoire) | Text | The Discord channel ID. |
| Limit | Number | Number of messages to return (1-100). Par défaut : 50 |
Réglages de Message · Get
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Channel ID (obligatoire) | Text | The Discord channel ID. |
| Message ID (obligatoire) | Text | The Discord message ID. |
Réglages de Message · React
| Réglage | Type | Ce que cela fait |
|---|---|---|
| Channel ID (obligatoire) | Text | The Discord channel ID. |
| Message ID (obligatoire) | Text | The Discord message ID. |
| Emoji (obligatoire) | Text | Unicode emoji (e.g. 👍) or a custom emoji as name:id. |
Affichage des réglages de Webhook · Send
- Leave Message empty if you fill the embed fields; at least one of them must have content.
- Embed Thumbnail URL must be a public image link. Embed Description accepts Discord Markdown, for example
**Price:** {{ $input.price }}. - Emoji is a plain emoji such as
👍, or a server emoji written asname:id, for exampledone:123456789012345678. - Channel, message and server ids are long numbers. In Discord, turn on Developer Mode (User settings → Advanced), then right-click a channel, message or server and choose Copy ID.
Outputs
Section titled “Outputs”-
Output
- Webhook → Send returns the posted message, including its
id. - Channel → List and Get messages return a list, one entry per channel or message, newest message first. Each message has
content,authorandtimestamp. - Message → React returns an empty object when the reaction is added.
Dependencies and credentials
Section titled “Dependencies and credentials”- Credential (connection, Bearer Token): required. See Connect Discord.
The secret you store depends on the resource. Create one credential for each, and pick the right one on the node.
- Webhook: store the full webhook URL. In Discord, open the channel’s Edit Channel → Integrations → Webhooks, create a webhook and copy its URL. Anyone with this URL can post to the channel, so keep it secret.
- Channel and Message: store a bot token from the Discord Developer Portal (your application → Bot → Reset Token). Invite the bot to your server, and turn on Message Content Intent on the Bot page if you need to read message text.
See Create a credential.
Example workflow
Section titled “Example workflow”- A Schedule trigger runs every hour.
- Get HTML from Link loads a product page, and HTML Extract reads the price.
- IF continues only when the price is below
50. - Discord, Webhook → Send, Embed Title
Price drop, Embed URL the product link, Embed DescriptionNow {{ $input.price }}.
Common issues
Section titled “Common issues”- “Discord API Error: Unknown Webhook”. The webhook URL is wrong or the webhook was deleted. Create a new one and update the credential.
- “Discord API Error: rate limited”. Discord received too many requests. Run the workflow less often.
- “Discord API Error: 401: Unauthorized” on Channel or Message. The credential holds a webhook URL or an invalid token. Use a bot token credential.
- “Discord API Error: Missing Access”. The bot is not in that server, or cannot see the channel. Invite it, or give its role access to the channel.
- The run is blocked in the web app. Discord runs through the browser extension. Install the extension and allow Discord for this workflow when asked, or run the workflow from the extension.
Related nodes
Section titled “Related nodes”- Slack and Telegram: other chat apps.
- Screenshot Page: capture a page to share.
- Push Notification: a message to your phone.