Skip to content
Docs

Discord

The Discord node posts a message to Discord. Use it to send notifications, alerts, or an agent’s reply. You find it on the node picker’s Channels — send a reply shelf.

The node sends in one of two ways:

  • With a webhook: posts to a Discord incoming webhook URL. The channel is fixed by the webhook.
  • As a workspace bot: posts as one of your workspace’s Discord bots, the bot you set up under Chat apps. It can answer the conversation that started the run, post in any channel or thread the bot listens in, write to a person directly, and edit a message it sent.

Fill in webhookUrl or pick a bot, not both. A node with both, or with neither, fails.

It has two handles: input, which takes the upstream node’s output (available in every field as $prev), and output, which passes the send result to the next node.

The Discord node's settings form, with the fields described below
The Discord node's settings form, with the fields described below
FieldTypeDefaultDescription
Content (content)string ✦ (required) — The text content of the message to send.
Embeds (embeds)string ✦ (optional) — Rich embeds as a JSON array, following Discord’s embed object format.
Attachments (attachments)string ✦ (optional) — Files to post with the message — a voice reply a Text to Speech node made, a report, an image.
Webhook URL (webhookUrl)string ✦ (optional) — The Discord incoming-webhook URL to post the message to. Leave it empty when the message goes out as a bot.
Username (username)string ✦ (optional) — An optional display name to override the webhook’s default username for this message.
Bot (bot)string ✦ (optional) — The workspace Discord bot to send as: one of its Discord connections.
Channel (channelId)string ✦ (optional) — The channel or thread to post in, by id. Leave it empty to answer where the run’s message came from.
User (userId)string ✦ (optional) — A person to message directly, by Discord user id, instead of a channel.
Message (messageId)string ✦ (optional) — The id of a message this bot sent, to edit it instead of posting a new one.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

Attachments picks stored files. Type part of a path, and the field lists the matching files of every file store in your workspace as Store › path, the newest first, 50 at most. One picked file is saved as its object id, several as a JSON array, and a list typed in before the field became a picker opens as its files. For a file another node produced, such as a spoken reply, click Insert a value ({x}) and write an expression, for example {!! $prev->object->versionId !!}.

On a successful send the node emits:

{ "status": "sent", "channel": "discord" }

As a bot, the output also says where the message went, so a later node can edit it:

{ "status": "sent", "channel": "discord", "channelId": "1290000000000000000", "messageId": "1300000000000000000" }

A text longer than Discord’s 2000 characters goes out as several messages, and messageIds lists them all. When the node carried files, files counts them. An edit answers "status": "edited".

A webhook send fails without retrying on any status other than 200 or 204. A bot send is retried when Discord is busy or rate-limits it, until the first message is out. After that, and on any other refusal, it fails without retrying, so nothing posts twice.

In Discord, open Server Settings → Integrations → Webhooks → New Webhook, choose the target channel, and copy the webhook URL. Store it in a secret and reference it with {!! $secrets->yourSlug !!} rather than pasting it inline.

Pick the bot under bot. It uses the token the connection already holds, so you need no webhook or second token. Where the message goes depends on which fields you fill in:

You fill in The bot posts
Nothing In the conversation whose message to this bot started the run, such as a channel, a thread or a direct message. A run started any other way (a schedule, a form, another flow) has no conversation to answer, and fails.
channelId In that channel or thread. It must be one the bot listens in: the connection’s Only in these servers and Only in these channels decide, and a thread counts as its channel.
userId In a direct message to that person.
messageId Nothing new. It edits that message instead, in the conversation or channelId. An edit cannot add files, and must fit in 2000 characters.

Fill in channelId or userId, not both.

The bot writes directly only to the person whose message started the run, and to the people listed under May send direct messages to on its connection. A scheduled run has no such person, so to send yourself a morning summary, add your own Discord user id to that list. To find an id, turn on Developer Mode under Discord’s Settings → Advanced, then right-click a person and choose Copy User ID.

Mentions in the message ping no one, so a quoted “@everyone” stays text.

Wired to a Form’s Send via handle, a new message sent as the bot also carries the form’s buttons, under the last part of the message. Pressing one answers the form from Discord, and the message then shows one grey button naming what was chosen and by whom. A webhook or an edit posts the link alone. See Answering from the chat message for when the buttons appear.

The Channel / Discord template is a minimal working send: Start → Injector → Discord, with content set to {{ $prev->message }}.

To post a scheduled summary to yourself as your bot:

  1. Add your Discord user id under May send direct messages to on the bot’s connection.
  2. In the Discord node, pick the bot under bot and set userId to your id.
  3. Set content to {!! $prev->content !!} (an Agent or LLM node emits its text under content, and escaping would corrupt characters in it).

When an agent calls this node as a tool, the send is approval-gated by default; see How to add human approval.

  • A webhook posts to its own fixed channel. username overrides the display name only, not the channel, and works with a webhook only.
  • A bot posts only where its connection listens, and writes directly only to the people above.
  • Invalid JSON in embeds is silently ignored; the message still sends without embeds.