Overview
This node enables sending various types of messages and interactive prompts to Discord channels. It supports simple text messages, rich embedded messages, interactive button or select dropdown prompts that wait for user responses, and specific Discord actions such as removing messages or managing user roles. This flexibility makes it useful for automating Discord server interactions, such as posting announcements, collecting user input via buttons or selects, moderating content by deleting messages, or managing user permissions by adding/removing roles.
Practical examples:
- Sending a welcome message with an embed when a new user joins.
- Posting a question with button options and waiting for users to respond.
- Removing the last 100 messages from a channel as part of moderation.
- Adding a role to a user after they complete a verification step.
Properties
| Name | Meaning |
|---|---|
| Replace the trigger placeholder | If enabled, the message sent will replace a previously set placeholder message (from a Discord Trigger node or another Discord Send node). |
| Send to the trigger channel | If enabled, sends the message to the same channel where the workflow was triggered, without replacing any placeholder. |
| Send to | Selects the target text channel to send the message to. Requires valid credentials and bot presence in the channel. |
| Type | The type of interaction: - Message: simple message - Button Prompt: interactive buttons - Select Prompt: dropdown list - Action: perform a Discord action - None: no message, used to clear placeholders or update status |
| Action | When Type is "Action", choose the action: - Remove messages - Add role to user - Remove role from user |
| User ID | The Discord user ID to add or remove roles from (required for role actions). |
| Which roles | Roles to add or remove from the user (for role actions). |
| How many? | Number of recent messages to remove (max 150, only messages less than 4 weeks old) for remove messages action. |
| Content | Text content of the message or prompt. Cannot be empty for button/select prompts. |
| Embed | Enable rich embedded message creation. |
| Color | Color of the embed sidebar. |
| Title | Embed title. |
| URL | URL linked from the embed title. |
| Author name | Name shown as author in the embed. |
| Author icon URL or base64 | Image URL or base64 string for the author icon. |
| Author URL | URL linked from the author name. |
| Description | Embed description text. |
| Thumbnail URL or base64 | URL or base64 image for the embed thumbnail. |
| Fields | Additional fields in the embed, each with title, value, and inline display option. |
| Image URL or base64 | URL or base64 image displayed in the embed. |
| Buttons | Up to 5 buttons for button prompts, each with label, return value, and style (Primary, Secondary, Success, Danger). |
| Select | Options for select dropdown prompts, each with label, optional description, and return value. |
| Persistent | For button/select prompts, if enabled, keeps the prompt visible after workflow completion. |
| Min select | Minimum number of options that must be selected in a persistent select prompt. |
| Max select | Maximum number of options that can be selected in a persistent select prompt. |
| Message ID | ID of the message to update instead of sending a new one (used with persistent prompts). |
| Footer text | Footer text in the embed. |
| Footer icon URL or base64 | Image URL or base64 for the footer icon. |
| Displayed date | Timestamp to show in the embed. |
| Timeout | Time in seconds to wait for user response on button/select prompts before continuing or stopping execution. 0 means wait indefinitely. |
| Restrict to triggering user | Only allow the user who triggered the workflow to interact with the prompt. |
| Restrict to mentioned roles | Only allow users with specified roles to interact with the prompt. |
| Files | Attach up to 5 images (png, jpg) to the message. |
| Mention roles | Roles to mention in the message. |
| Placeholder | Placeholder text shown while the workflow is running, with animated dots. Can be replaced later by another Discord Send node. |
| Bot customization | Enable customizing the bot's activity and status. |
| Bot activity | Text describing the bot's current activity (e.g., "Playing X"). |
| Bot activity type | Type of bot activity: Playing, Streaming, Listening, Watching. |
| Bot status | Bot's online status: Online, Idle, Do not disturb, Invisible. |
Output
The node outputs an array of JSON objects, each representing the result of sending a message or performing an action. Each output item contains:
value: The returned value from the interaction (e.g., button clicked value).channelId: The ID of the channel where the message or action occurred.userId: The ID of the user interacting or affected.userName: The username of the user.userTag: The user's Discord tag.messageId: The ID of the message sent or updated.action: The action performed (if applicable).
If the node sends interactive prompts, it waits for user responses and returns the selected values accordingly.
Binary data output is not indicated; attachments are sent but not output as binary data.
Dependencies
- Requires a valid Discord API credential with appropriate permissions.
- The bot must be running and present in the target Discord server and channels.
- The node uses internal IPC communication to handle sending messages and receiving responses.
- Channels and roles lists are dynamically loaded via helper methods requiring proper API access.
Troubleshooting
Common issues:
- Missing or invalid Discord API credentials will cause connection errors.
- Attempting to send messages to channels where the bot is not present or lacks permissions will fail.
- Removing messages older than 4 weeks or more than 150 at once is not supported by Discord API.
- Empty content for button/select prompts will cause errors.
- Invalid user IDs or role IDs for role management actions will cause failures.
Error messages:
- Connection errors indicate invalid credentials or network issues.
- Permission errors when sending messages or performing actions suggest insufficient bot permissions.
- Validation errors for missing required parameters like userId or roles.
Resolutions:
- Verify and reconfigure Discord API credentials.
- Ensure the bot has necessary permissions in the Discord server and channels.
- Check that user and role IDs exist and are correct.
- Provide all required inputs, especially for interactive prompts.
Links and References
- Discord Developer Portal
- Discord Message Embeds Documentation
- Discord Interactions (Buttons & Select Menus)
- n8n documentation on creating Discord workflows (if available)