Overview
This node enables sending various types of messages and performing actions on Discord servers through a bot. It supports sending plain text messages, rich embedded messages, interactive prompts with buttons or select dropdowns, voice channel operations, and administrative actions like managing roles or deleting messages.
Common scenarios include:
- Sending notifications or alerts to specific Discord channels.
- Creating interactive workflows where users respond via buttons or dropdowns.
- Managing user roles automatically based on workflow logic.
- Controlling bot presence and voice channel behavior (joining, playing audio).
- Cleaning up channels by bulk deleting recent messages.
Practical examples:
- A support workflow that sends a message with buttons for users to select issue categories.
- An event bot that assigns roles to users when they join a voice channel.
- A moderation tool that removes the last 100 messages in a channel after an incident.
- A music bot that joins a voice channel and plays requested audio streams.
Properties
| Name | Meaning |
|---|---|
| Replace the trigger placeholder | If enabled, the message sent will replace a previously set placeholder message (from a trigger or another send node). |
| Send to the trigger channel | If enabled, sends the message to the same channel where the workflow was triggered (without replacing placeholders). |
| Send to | Select the text channel(s) where the message should be sent. Requires valid credentials and bot permissions. |
| Type | Choose the type of interaction: Message, Button Prompt, Select Prompt, Action, Voice, or None. |
| 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 specified user (required for role actions). |
| How many? | Number of last messages to remove (max 150, only messages less than 4 weeks old) for Remove messages action. |
| Content | Text content of the message or prompt. Required for button/select prompts. |
| Embed | Enable rich embed message creation. |
| Color | Embed color (if embed enabled). |
| Title | Embed title. |
| URL | URL associated with 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 to the embed author name. |
| Description | Embed description text. |
| Thumbnail URL or base64 | URL or base64 image for embed thumbnail. |
| Fields | Embed fields: multiple title/value pairs with optional inline display. |
| Image URL or base64 | URL or base64 image for embed main image. |
| Buttons | Up to 5 buttons for interactive button prompts, each with label, value, and style (Primary, Secondary, Success, Danger). |
| Select | Options for select dropdown prompts, each with label, optional description, and value. |
| Persistent | For button/select prompts, if enabled, keeps the prompt visible after workflow finishes. |
| 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; otherwise sends a new message. |
| Footer text | Embed footer text. |
| Footer icon URL or base64 | Image URL or base64 for embed footer icon. |
| Displayed date | Timestamp to show in the embed. |
| Timeout | Time in seconds to wait for user interaction on 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 (png, jpg) to the message by URL or base64. |
| Mention roles | Roles to mention in the message. Requires bot permissions and available roles. |
| Placeholder | Placeholder message shown while waiting for user interaction on button/select prompts. |
| 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 activity displayed: Playing, Streaming, Listening, Watching. |
| Bot status | Bot online status: Online, Idle, Do not disturb, Invisible. |
| Audit Log Reason | Reason logged in Discord audit logs for actions performed (like role changes or message removals). |
| Voice Action | Voice-related action: Join Channel, Leave Channel, Play Audio, Stop Audio. |
| Voice Channel | Voice channel to join or play audio in (required for join/play voice actions). |
| Audio URL | URL of audio to play in voice channel (supports YouTube URLs). |
Output
The node outputs JSON objects containing information about the result of the operation or interaction, including:
value: The value returned by the interaction (e.g., button clicked or select option 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 user.userTag: The user's Discord tag.messageId: The ID of the message sent or updated.action: The action performed (e.g., role added/removed, messages deleted).
If the node sends binary data (such as images attached to messages), it handles them accordingly but this is abstracted away in the output.
Dependencies
- Requires a valid Discord bot API key credential with appropriate permissions.
- The bot must be running and connected to the Discord server.
- Permissions needed depend on actions: sending messages, managing roles, deleting messages, joining voice channels, etc.
- The node uses Discord API v10 endpoints.
- For voice actions, the node manages voice connections and audio playback internally.
- Channels, roles, and voice channels are dynamically loaded from the Discord server via helper methods.
Troubleshooting
- Invalid Credentials: If the API key is invalid or lacks permissions, the node will throw authentication errors. Verify the bot token and ensure the bot has required permissions.
- Channel or Role Not Found: If specified channels or roles do not exist or the bot lacks access, loading options or sending messages will fail. Refresh the modal after fixing permissions or adding channels/roles.
- Message Deletion Limits: Discord API restricts bulk deletion to messages younger than 2 weeks and max 150 messages at once. Attempting to delete older or too many messages will cause errors.
- Timeouts on Prompts: If timeout is set to 0, the node waits indefinitely for user interaction, which may stall workflows unintentionally.
- Voice Actions Fail: Joining or playing audio in voice channels requires the bot to have voice permissions and the channel to exist. Check voice channel IDs and bot permissions.
- Placeholder Replacement Issues: Using placeholder replacement requires a prior placeholder message set by a trigger or another send node; otherwise, replacement will fail.
- Button/Select Interaction Restrictions: Restricting interactions to triggering user or roles may cause no responses if conditions are not met.