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
Actions
Section titled “Actions”Instructions
Section titled “Instructions”To set up Discord integration:
- Go to the Discord Developer Portal (https://discord.com/developers/applications)
- Click New Application and give it a name
- 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
- 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
- Paste the Bot Token in the Bot Token field below
Get Last Mention
Section titled “Get Last Mention”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.
Use Cases
Section titled “Use Cases”- 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
Configuration
Section titled “Configuration”- 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).
Output
Section titled “Output”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
Example Output
Section titled “Example Output”{ "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"}Send Text Message
Section titled “Send Text Message”Component key: discord.sendTextMessage
The Send Text Message component sends a message to a Discord channel.
Use Cases
Section titled “Use Cases”- 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
Configuration
Section titled “Configuration”-
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’sencodingfield (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.
Output
Section titled “Output”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
Example Output
Section titled “Example Output”{ "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"}