Discord Get icon

Discord Get

Gets information from Discord

Overview

The Discord Get node retrieves information from Discord channels, primarily focusing on fetching messages. It is useful in workflows where you need to automate the extraction of recent messages from a specific channel or the channel that triggered the workflow. Common scenarios include monitoring conversations, archiving messages, or triggering actions based on recent chat activity.

Practical examples:

  • Fetching the last 10 messages from a support channel for sentiment analysis.
  • Collecting messages from a project channel to generate daily summaries.
  • Monitoring a trigger channel for new user questions and forwarding them to a helpdesk system.

Properties

Name Meaning
Get from trigger channel If enabled, retrieves information from the same channel where the workflow was triggered. Does not replace any placeholder if present.
Get from Lets you specify which text channel to get information from. Requires bot credentials and at least one available text channel. The list of channels loads when the modal opens.
Type Selects the type of information to retrieve. Options: Messages (default; allows retrieval of a number of messages from the channel).
User ID (Coming Soon) Only get messages from this user. Currently not active.
Which roles (Coming Soon) Only get messages from these roles. Currently not active.
How many? Number of messages to retrieve (before filtering). Required field.

Output

The node outputs an array of objects with the following structure:

{
  "json": {
    "messages": [ /* Array of message objects as returned by Discord */ ]
  }
}
  • messages: An array containing the retrieved Discord messages. Each item represents a message object as provided by the Discord API.

Note: This node does not output binary data.

Dependencies

  • External Service: Requires access to the Discord API via a bot.
  • Credentials: You must configure discordApi credentials in n8n, including API key, base URL, and token.
  • Bot Requirements: The bot must be running and have access to the relevant channels.

Troubleshooting

  • Missing Channels: If no channels appear in the "Get from" dropdown, ensure your bot is running, has the correct permissions, and at least one text channel exists. Try closing and reopening the node modal to reload the channel list.
  • Authentication Errors: Errors related to invalid credentials or connection issues will throw messages such as "Error: [error details]". Double-check your Discord API credentials in n8n.
  • Insufficient Permissions: If the bot lacks permission to read messages in the selected channel, the node may fail silently or return empty results. Ensure the bot has the necessary permissions.
  • Feature Not Available: Fields like "User ID" and "Which roles" are marked as "Coming Soon" and currently do not filter messages.

Links and References

Discussion