Discord Trigger

Receives Discord messages and interactions and starts workflow execution. Use this to build automations that react to activity in your Discord server.

When to Use

Use Discord Trigger when:

  • You want to run a workflow when a message is posted in a channel
  • You need to handle slash commands or button interactions
  • Discord is the event source and your workflow runs asynchronously

For sending messages back to Discord, pair this with Discord Send Message.

Setup

  1. Create a Discord Application and Bot at discord.com/developers/applications
  2. Copy the Bot Token and Public Key from the application settings
  3. Under General Information, set the Interactions Endpoint URL to your deployed trigger endpoint on triggers.tensorify.io
  4. Enable the Message Content Intent if you need to read message text
  5. Invite the bot to your server with appropriate permissions
  6. Add DISCORD_BOT_TOKEN and DISCORD_PUBLIC_KEY on the Env Vars page
  7. Deploy the workflow to activate the endpoint

The plugin handles Discord's PING verification automatically — no manual setup required.

Output

HandleTypeDescription
payloadobjectNormalized Discord event payload

The payload (accessed as {{ discord.* }}) shape:

FieldTypeDescription
authorobjectMessage author object (username, id, etc.)
channel_idstringChannel ID where the event occurred
guild_idstringServer (guild) ID
contentstringMessage text content
message_idstringDiscord message ID
attachmentsarrayFile attachments on the message
event_typestringEvent type (e.g., MESSAGE_CREATE, INTERACTION_CREATE)
raw_eventobjectFull Discord event object for advanced use cases

Settings

SettingTypeDefaultDescription
event_typesmulti-selectMESSAGE_CREATEDiscord event types: MESSAGE_CREATE, INTERACTION_CREATE
guild_filterstringOnly trigger for events in this guild (server) ID
channel_filterstringOnly trigger for events in this channel ID
mockPayloadJSONTest payload injected during canvas testing.

Authentication

Env VarDescription
DISCORD_BOT_TOKENBot token from your Discord application
DISCORD_PUBLIC_KEYApplication public key used for Ed25519 signature verification

Incoming requests are verified using Ed25519 signatures against your public key.

Example

React to new messages in a specific channel:

  1. Set event_types to MESSAGE_CREATE
  2. Set channel_filter to your target channel ID
  3. Add a Discord Send Message node to post a response via webhook

Access event data in downstream nodes:

{{ discord.author.username }}
{{ discord.content }}
{{ discord.channel_id }}
{{ discord.guild_id }}
{{ discord.event_type }}

Common Gotchas

  • Message Content Intent: Discord requires the Message Content Intent to be enabled in the Developer Portal for bots to read message text.
  • Interactions vs. messages: INTERACTION_CREATE covers slash commands and component interactions. Use MESSAGE_CREATE for regular channel messages.
  • Public key verification: Requests without a valid Ed25519 signature are rejected. Ensure DISCORD_PUBLIC_KEY matches your application settings exactly.
  • Guild and channel filters: Use numeric Discord IDs, not names. Enable Developer Mode in Discord to copy IDs from the context menu.

See Also

On this page