Skip to content

Components / Discord

Discord

Post SuperPlane workflow updates to Discord channels and fetch the latest message that mentions your bot to act on requests from your team.

Send messages to Discord channels and fetch mentions

To set up Discord integration:

  1. Go to the Discord Developer Portal (https://discord.com/developers/applications)
  2. Click New Application and give it a name
  3. Go to OAuth2 → URL Generator:
    • Under Scopes, select bot
    • Under Bot Permissions, select View Channels, Send Messages, Attach Files and Read Message History. Attach Files is required for the Send Text Message component to upload file attachments.
    • Copy the generated URL and open it in a new tab to invite the bot to your server
  4. Go to the Bot section:
    • Click Add Bot (if not already added)
    • Uncheck the Public Bot option
    • Under Token, click Reset Token then Copy to get your bot token
  5. Paste the Bot Token in the Bot Token field below

Component key: discord.getLastMention

The Get Last Mention component fetches recent messages from a Discord channel and returns the latest one that mentions your bot.

  • Command polling: Retrieve the most recent mention command in a channel
  • Manual workflows: Pull latest bot mention on demand in a workflow step
  • Mention auditing: Inspect the latest mention payload before replying
  • Channel: Discord channel to search for mentions
  • Since: Optional date string lower-bound for mentions (only mentions at or after this time are considered). Supports expressions. Accepted formats include ISO 8601 (recommended) and Go’s default timestamp format (e.g. 2026-03-16 04:17:08.750328135 +0000 UTC).

The payload includes:

  • channel_id: Channel queried
  • mention: Full message payload for the latest bot mention (when found)

Output channels:

  • found: Emitted when a matching mention is found
  • notFound: Emitted when no matching mention is found
  • Requires the bot permission Read Message History in the selected channel
  • Only non-bot-authored messages are considered
  • Datetimes without timezone in Since are interpreted as UTC
{
"data": {
"channel_id": "1381731186335651880",
"mention": {
"author": {
"bot": false,
"id": "98432147091234567",
"username": "pedro"
},
"channel_id": "1381731186335651880",
"content": "\u003c@1372980427293554709\u003e can you run /deploy?",
"guild_id": "1381731029892325376",
"id": "1381731283190517770",
"mentions": [
{
"bot": true,
"id": "1372980427293554709",
"username": "superplane-bot"
}
],
"timestamp": "2026-03-10T15:04:05.000Z"
}
},
"timestamp": "2026-03-10T15:04:05.000Z",
"type": "discord.getLastMention.result"
}

Component key: discord.sendTextMessage

The Send Text Message component sends a message to a Discord channel.

  • Notifications: Send notifications about workflow events or system status
  • Alerts: Alert teams about important events or errors
  • Updates: Provide status updates on long-running processes
  • Channel: Select the Discord channel to send the message to

  • Content: Plain text message content (max 2000 characters)

  • Embed Title: Optional title for a rich embed

  • Embed Description: Optional description for a rich embed

  • Embed Color: Hex color code for the embed (e.g., #5865F2)

  • Embed URL: Optional URL to link from the embed title

  • Files: Optional files to attach. Each entry picks a Source:

    • URL — a public http(s) link; the file is downloaded and attached.
    • Inline content — the file content itself, e.g. an AI component artifact: set Content to {{ $['Text Prompt'].data.artifacts[0].content }}, pick the MIME Type and set Encoding to match the artifact’s encoding field (text for plain text, base64 for binary files like images).

    An optional Filename names the attachment; when omitted it is derived from the URL or the file’s detected type.

Returns metadata about the sent message including message ID, channel ID and author information.

  • Either content, embed (title/description), or files must be provided
  • Up to 10 files per message, 8 MiB each (Discord limits)
  • The Discord bot must be installed and have permission to post to the selected channel
  • Supports Discord’s rich embed formatting for visually appealing messages
{
"data": {
"author": {
"bot": true,
"id": "1111111111111111111",
"username": "Webhook"
},
"channel_id": "9876543210987654321",
"content": "Hello from SuperPlane",
"id": "1234567890123456789",
"timestamp": "2026-01-16T12:00:00.000Z"
},
"timestamp": "2026-01-16T17:56:16.680755501Z",
"type": "discord.message.sent"
}

Was this page helpful?

Last updated: