Discord Trigger icon

Discord Trigger

Listen to Discord Gateway events over a persistent WebSocket connection. Set "Connection Name" to allow the Discord Gateway Send node to push commands through this connection.

Discord Trigger

AI-generated

Summary

Listen for selected Discord Gateway events over a persistent WebSocket connection and emit each matching event as an n8n item. Choose a specific event or Any Event; the trigger can derive the required Gateway intents automatically or use a manually selected intent set.

Inputs

  • Event (required) — Select the Gateway event to receive, or Any Event to receive all dispatched events. For message create and update events, Include Bot Messages controls whether messages from bots, webhooks, and Discord system authors are emitted; the default filters them out.
  • Connection Name — Connection identifier, defaulting to default, for routing commands to this active connection through the Discord Gateway Send node.
  • Auto Calculate Intents — Defaults to enabled and derives Gateway intents from the selected event. If disabled, select the intents to send with Identify. Privileged intents must also be enabled in the Discord Developer Portal; otherwise Discord may close the connection with code 4014.
  • Intents — When Auto Calculate Intents is disabled, choose the Gateway intents to send with Identify. If none are selected, the implementation falls back to the event's derived intents, or GUILDS when no event mapping exists.
  • Include Bot Messages — For MESSAGE_CREATE, MESSAGE_UPDATE, or Any Event, defaults to false and filters out bot-authored, webhook, and system messages. Enable it to emit those messages too.
  • Emit Raw Gateway Payload — Defaults to false. When enabled, emits the full Gateway payload; otherwise emits an object containing the event name and its data.

Output shape

A stream of n8n items, one for each emitted event.

By default each item has event and data fields. With Emit Raw Gateway Payload enabled, each item contains the full Gateway payload instead. Any Event includes dispatched Gateway events; message create and update events are filtered according to Include Bot Messages.

Links

Discussion