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.
Common scenarios include:
- Sending announcements or updates with optional rich embeds.
- Creating interactive workflows where users respond via buttons or dropdowns.
- Moderation tasks like bulk deleting messages or assigning/removing roles.
- Updating bot status or clearing placeholders without sending new messages.
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 | Select the target text channel to send the message. Requires valid credentials and bot presence in the channel. |
Type | Choose the interaction type: Message (simple text), Button Prompt (interactive buttons), Select Prompt (dropdown list), Action (perform an action), None (no message, just update/clear). |
Action | When Type is Action, choose the action: Remove messages, Add role to user, Remove role from user. |
User ID | For role add/remove actions, specify the user ID to modify. |
Which roles | For role add/remove actions, select one or more roles to add or remove from the user. |
How many? | For Remove messages action, number of recent messages to delete (max 150, only messages younger than 4 weeks). |
Content | Text content of the message or prompt. Required for button/select prompts. |
Embed | Enable rich embed creation for messages. |
Color | Embed color (if embed enabled). |
Title | Embed title. |
URL | URL linked from the embed title. |
Author name | Embed author name. |
Author icon URL or base64 | Image URL or base64 string for embed author icon. |
Author URL | URL linked from the embed author name. |
Description | Embed description text. |
Thumbnail URL or base64 | URL/base64 for embed thumbnail image. |
Fields | Embed fields: multiple entries with title, value, and inline display option. |
Image URL or base64 | URL/base64 for main embed image. |
Buttons | Up to 5 buttons for Button Prompt type, each with label, return value, and style (Primary, Secondary, Success, Danger). |
Select | Options for Select Prompt type, each with label, optional description, and return value. |
Persistent | For button/select prompts, if enabled the prompt stays visible after workflow finishes. |
Min select | Minimum number of options to select in persistent select prompts. |
Max select | Maximum number of options to select in persistent select prompts. |
Message ID | For persistent prompts, ID of the message to update instead of sending a new one. |
Footer text | Embed footer text. |
Footer icon URL or base64 | Image URL/base64 for embed footer icon. |
Displayed date | Timestamp to show in 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 by URL or base64. |
Mention roles | Roles to mention in the message. Requires valid credentials and bot permissions. |
Placeholder | Placeholder text shown while waiting for user interaction on button/select prompts, with animated dots indicating workflow running. |
Bot customization | Enable customizing the bot's activity and status. |
Bot activity | Text describing the bot's current activity (e.g., "Playing", "Streaming"). |
Bot activity type | Type of bot activity displayed: Playing, Streaming, Listening, Watching. |
Bot status | Bot 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 includes:
value
: The returned value from the interaction, e.g., button clicked or select chosen.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 interacting user.userTag
: The user's tag (username#discriminator).messageId
: The ID of the sent or updated message.action
: The performed action type (for action operations).
If the node sends binary data (e.g., attached images), it will be included accordingly but is not detailed here.
Dependencies
- Requires a valid Discord API authentication token configured in n8n credentials.
- The bot must be running and have appropriate permissions in the target Discord server and channels.
- Access to Discord channels and roles depends on the bot's permissions.
- Uses internal helper methods to load available channels and roles dynamically.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause connection errors.
- Insufficient bot permissions can prevent sending messages, managing roles, or deleting messages.
- Trying to delete messages older than 4 weeks will fail due to Discord API limitations.
- Specifying non-existent channel IDs, user IDs, or role IDs will cause errors.
- Using button/select prompts without required content or options will cause validation errors.
- Persistent prompts require correct message IDs to update existing messages.
Error messages:
- Connection errors 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.
- Timeout errors happen if no user interaction occurs within the specified timeout period.
To resolve these, verify credentials, check bot permissions in Discord, ensure all required parameters are set, and confirm IDs correspond to existing entities.