Overview
The "Discord Get" node retrieves information from Discord channels, primarily focusing on fetching messages. It is useful in workflows where you want to gather recent messages from a specific text channel or the channel that triggered the workflow. For example, you might use this node to analyze chat activity, monitor conversations for keywords, or archive messages automatically.
Common scenarios include:
- Collecting a set number of recent messages from a designated Discord channel.
- Automatically processing messages from the channel where the workflow was triggered.
- Filtering messages by user or role (planned features).
Properties
| Name | Meaning |
|---|---|
| Get from trigger channel | If enabled, fetches messages from the same channel that triggered the workflow instead of specifying a channel manually. |
| Get from | Selects the specific text channel to get messages from. Requires valid credentials and an active bot with access to channels. |
| Type | The type of information to retrieve. Currently supports only "Messages" which fetches messages from the selected channel. |
| User ID | (Coming Soon) Filter to get messages only from a specific user by their ID. |
| Which roles | (Coming Soon) Filter to get messages only from users with specified roles. |
| How many? | Number of messages to retrieve before any filtering is applied. |
Output
The node outputs an array of items, each containing a json field with a messages property. This messages property holds the retrieved messages from Discord as an array. Each message object includes details such as content, author, timestamp, etc., depending on what the Discord API returns.
If binary data were supported, it would be summarized here, but this node focuses solely on JSON message data.
Dependencies
- Requires a valid Discord API credential with appropriate permissions.
- A running Discord bot connected to the server with access to the target channels.
- The bot must have permission to read messages in the specified channels.
- Channels and roles lists are dynamically loaded via helper methods when configuring the node.
Troubleshooting
- Common issues:
- No messages returned: Ensure the bot has permission to read messages in the selected channel.
- Channel list empty: Verify the bot is running and connected; reload the modal to refresh channel options.
- Authentication errors: Confirm the API key/credential is valid and has necessary scopes.
- Error messages:
- Connection errors indicate problems authenticating or reaching Discord's API.
- IPC request failures suggest internal communication issues within the node or invalid parameters.
To resolve these, check bot status, permissions, and credential validity. Restarting the bot or reloading the node configuration often helps.
Links and References
- Discord Developer Portal
- Discord API Documentation - Messages
- n8n documentation on Creating Custom Nodes