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 actions like removing messages or managing user roles. This flexibility makes it useful for automating Discord server interactions such as announcements, polls, role assignments, and message management.
Practical examples:
- Sending a welcome message with embedded content and images.
- Creating a button prompt to let users choose options interactively.
- Removing recent messages from a channel automatically.
- Adding or removing roles from users based on workflow logic.
Properties
| Name | Meaning |
|---|---|
| Replace the trigger placeholder | If enabled, the message sent by this node replaces 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 permissions. |
| Type | The type of interaction: Message (simple text), Button Prompt (interactive buttons), Select Prompt (dropdown list), Action (perform an action), or None (clear placeholder or update status). |
| Action | When Type is "Action", choose the specific action: Remove messages, Add role to user, or 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 specified user (required for role actions). |
| How many? | Number of last messages to remove (max 150, only messages less than 4 weeks old) when removing messages. |
| Content | Text content of the message or prompt. Cannot be empty for button or select prompts. |
| Embed | Enable rich embedded message creation. |
| Color | Color of the embed sidebar (if embed enabled). |
| Title | Embed title. |
| URL | URL linked in 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 in the embed. |
| Author URL | URL linked from the author name in the embed. |
| Description | Embed description text. |
| Thumbnail URL or base64 | URL or base64 image for the embed thumbnail. |
| Fields | Additional fields in the embed; each has a title, value, and optional inline display. |
| 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 prompts, each with label, optional description, and return value. |
| Persistent | For button/select prompts, keeps the prompt visible after workflow finishes if enabled. |
| 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 when persistent is enabled; if empty, sends a new message. |
| Footer text | Footer text in the embed. |
| Footer icon URL or base64 | Image URL or base64 for the footer icon in the embed. |
| Displayed date | Timestamp to show in the embed. |
| Timeout | Time in seconds to wait for user response in button/select prompts before continuing or stopping execution. Zero 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 (URL or base64) to the message. |
| Mention roles | Roles to mention in the message. Requires valid credentials and bot permissions. |
| Placeholder | Placeholder message text shown while waiting for user interaction in button/select prompts. Animated dots indicate workflow running. |
| 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 JSON objects containing information about the sent message or performed action. The output JSON includes:
value: The value returned by the node, e.g., button or select option chosen by a user.channelId: The ID of the channel where the message or prompt was sent.userId: The ID of the user who interacted (for prompts).userName: The username of the interacting user.userTag: The user's tag (username#discriminator).messageId: The ID of the sent or updated message.action: The action performed (e.g., role added/removed, messages removed).
If the node sends binary data (such as attached images), it is handled internally but not explicitly detailed here.
Dependencies
- Requires a valid API key credential for Discord with appropriate permissions.
- The bot must be running and connected to the Discord server.
- The bot needs permission to send messages, manage roles, and delete messages depending on the operation.
- Channels and roles lists are dynamically loaded via helper methods requiring proper authentication.
- No external services beyond Discord API are required.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause connection errors.
- Insufficient bot permissions may prevent sending messages, deleting messages, or managing roles.
- Trying to remove more than 150 messages or messages older than 4 weeks will fail due to Discord API limits.
- Empty content for button or select prompts will cause validation errors.
- Specifying a non-existent channel or role will result in errors.
Error messages:
- Connection errors typically indicate invalid or missing API keys.
- Permission denied errors suggest the bot lacks required Discord permissions.
- Validation errors occur if required parameters are missing or invalid.
Resolutions:
- Verify and configure correct API credentials.
- Ensure the bot has necessary permissions on the Discord server.
- Check input parameters carefully, especially IDs and counts.
- Reload the modal to refresh channel and role lists if they do not appear.
Links and References
- Discord Developer Portal
- Discord API Documentation
- Discord Message Embeds Guide
- n8n Documentation (for general usage guidance)