Skip to content

Discord Sink

The Discord sink supports two distinct delivery styles: message events received through the Discord Gateway and interactions delivered to a hosted HTTP endpoint.

| Style | Receives | Required configuration | |---|---|---| | Gateway | Bot messages from guild channels and direct messages | Bot token, enabled Gateway intents, and a running desktop app or sink worker | | Interactions webhook | PING verification, slash commands, components, autocomplete, and modal submissions | Public HTTPS URL and the application's public key |

Gateway mode is used by the desktop adapter and is also available to the Docker Compose sink service. The hosted API exposes the interactions webhook when Discord is enabled in the hub.

| Field | Applies to | Meaning | |---|---|---| | token | Gateway | Discord bot token | | webhook_secret | Webhook | Discord application public key, despite the legacy field name | | intents | Gateway | Requested Gateway intents | | channel_whitelist | Desktop Gateway | Process only listed channel IDs when non-empty | | channel_blacklist | Desktop Gateway | Ignore listed channel IDs | | respond_to_mentions | Gateway | In guilds, require a mention when enabled | | respond_to_dms | Gateway | Accept direct messages | | command_prefix | Gateway | Treat prefixed messages as targeted commands | | bot_name, bot_description | UI metadata | Display information for the event configuration |

The default desktop intents are Guilds, GuildMessages, and MessageContent. MessageContent, GuildMembers, and GuildPresences are privileged intents and must also be enabled in the Discord Developer Portal if selected.

  1. Create an application and bot in the Discord Developer Portal.
  2. Copy the bot token into the event configuration.
  3. Enable only the Gateway intents the event needs.
  4. Add the bot to the relevant server and activate the event.

The adapter ignores messages authored by bots. It then applies direct-message, channel, prefix, and mention rules before dispatching the event.

  1. Copy the application's Public Key from Discord's General Information page into the event's application-public-key field.
  2. Activate the event.
  3. Copy the generated Interactions Endpoint URL from Flow-Like. Its route ends in /sink/trigger/discord/{event_id}; the deployment may add an API prefix at the proxy layer.
  4. Paste that URL into Discord's Interactions Endpoint URL field.

Discord sends a PING while validating the URL. Flow-Like verifies the Ed25519 signature and returns PONG for a valid PING.

For other interaction types, Flow-Like creates a run asynchronously and returns a deferred interaction response (type: 5) so Discord receives an acknowledgement within its response window.

The webhook verifies:

  • X-Signature-Ed25519
  • X-Signature-Timestamp
  • the exact request body
  • the public key stored for the active event sink

The public key is safe to share with the endpoint configuration; the bot token and any workflow credentials are not.

The payload depends on the delivery style:

  • A Gateway adapter constructs message-oriented context, including the author, channel, content, and available conversation context.
  • The interactions endpoint forwards the Discord interaction JSON, including fields such as type, data, token, guild_id, and channel_id.

Model the event input for the selected style. If one event can be delivered through both styles, branch on the payload shape before accessing nested fields.

An interactions webhook only acknowledges receipt; it does not wait for the workflow to finish. A workflow that needs to answer a slash command must use the interaction token with Discord's follow-up API.

Gateway message workflows can respond through the Discord context supplied by the desktop adapter. That context is not present on a webhook-triggered run.

| Symptom | Check | |---|---| | Discord rejects the endpoint URL | Event is active, URL is publicly reachable, public key is correct | | Gateway connects but sees no content | MessageContent is selected and enabled in the Developer Portal | | Guild messages are ignored | Mention, prefix, and channel filters | | DMs are ignored | respond_to_dms | | Webhook returns 401 | Signature headers, request body integrity, and application public key |