Discord has grown far beyond gaming — it's now the default community platform for developer tools, SaaS products, open source projects, and creator communities. n8n's Discord node lets you send messages, manage channels, react to events, and build moderation bots without writing a full-time bot process. This guide covers every operation, the gotchas, and three workflow patterns ready to import.
What the Discord Node Does
The n8n Discord node supports two authentication modes and several resource types:
| Resource | Operations |
|---|---|
| Message | Send, Delete, Get, Get All, React with Emoji, Remove Reaction |
| Channel | Create, Delete, Get, Get All, Update |
| Member | Get, Get All, Role Add, Role Remove |
| Webhook | Execute (send message via webhook URL) |
Two auth modes:
- Bot Token (recommended) — full API access; requires creating a Discord App and Bot
- Webhook — simpler, send-only; no bot needed, just a webhook URL from channel settings
Setting Up the Credential
Bot Token (Full Access)
- Go to discord.com/developers/applications → New Application
- Name your app (e.g. "n8n Bot") → go to Bot tab → Add Bot
- Copy the Token (keep it secret)
- Under Privileged Gateway Intents, enable Server Members Intent and Message Content Intent if your workflows read messages
- Invite the bot to your server: OAuth2 → URL Generator, select scopes
bot+applications.commands, select permissions (at minimum: Send Messages, Read Message History, Manage Roles if needed), copy and visit the generated URL - In n8n, add a Discord Bot credential and paste the token + your Bot ID (from the General Information tab)
Webhook (Send-Only, Simpler)
- In Discord, right-click a channel → Edit Channel → Integrations → Webhooks → New Webhook
- Name it, copy the webhook URL
- In n8n, use the Discord credential → Webhook type and paste the URL
- Use the Execute Webhook operation to send messages
Key Operations
Send Message
{
"channelId": "1234567890",
"content": "Deployment complete: v2.4.1 shipped to production at {{$now.toISO()}}",
"embeds": [
{
"title": "Deploy Summary",
"color": 3066993,
"fields": [
{"name": "Version", "value": "v2.4.1", "inline": true},
{"name": "Duration", "value": "2m 14s", "inline": true}
]
}
]
}
Embeds support title, description, color (decimal integer), fields (array), footer, thumbnail, and image.
React with Emoji
Adds an emoji reaction to a message. Useful for bot-driven poll tracking or acknowledgement workflows:
{
"channelId": "1234567890",
"messageId": "9876543210",
"emoji": "✅"
}
For custom server emojis use the format emojiName:emojiId.
Member Role Management
Add or remove roles from server members — useful for automating access control when a user purchases, subscribes, or completes onboarding:
{
"guildId": "1122334455",
"userId": "9988776655",
"roleId": "5544332211"
}
6 Gotchas
Channel IDs and Guild IDs are not the same as names. Right-click any channel in Discord → Copy Channel ID (requires Developer Mode: Settings → Advanced → Developer Mode). Same for server (guild) and message IDs.
Message Content Intent required for reading messages. If your workflow involves reading message content (not just sending), the bot needs the Message Content Intent enabled in the Developer Portal. Without it,
message.contentreturns an empty string for messages not directed at the bot.sendLegacyoperation can cause "[item 0]" errors. If you see[item 0]in the message content, it usually means you passed an n8n expression like{{ $json.message }}but the field was empty or undefined. Always add a null check before sending.Rate limits are per-channel. Discord rate-limits message sends per channel (roughly 5 messages/5 seconds for bots). For bulk announcements to multiple channels, add a Wait node (1 second) between sends to avoid 429 errors.
Bot must have the right permissions in the channel. Even if the bot is invited with broad permissions, individual channels can override them with permission overwrites. If a message send returns 403 Missing Permissions, check the specific channel's permission settings for the bot's role.
Embeds don't work with webhooks in the same way. Webhook-based sends support embeds, but the embed format is slightly different (passed as an array). Bot-based sends use the node's built-in embed fields. If you're switching between modes, test embed rendering separately.
3 Workflow Patterns
Pattern 1: Stripe Payment → Discord Role Grant + Welcome Message
When a customer purchases, give them a paid-member Discord role and send them a welcome DM.
Trigger: Webhook Trigger (payment_intent.succeeded from Stripe)
Steps:
- Parse
customer.emailandmetadata.discord_user_id(store Discord ID in Stripe customer metadata at checkout) - Discord node → Member Role Add: grant
paid-memberrole to the Discord user ID - Discord node → Send Message (in
#welcomechannel): "@{username} just joined as a paid member! 🎉" - (Optional) HTTP Request → Discord DM: send a direct message with onboarding links
Note: This requires collecting the Discord user ID at checkout. Add a custom field in your Stripe Payment Link or checkout form: "Discord username (optional)".
Pattern 2: GitHub Action → Discord Deploy Alert
Post structured deploy notifications to a Discord #deployments channel every time CI/CD completes.
Trigger: Webhook Trigger (GitHub Actions workflow_run event, conclusion = success or failure)
Steps:
- Code node — determine embed color:
3066993(green) for success,15158332(red) for failure - Discord node → Send Message with embed:
- Title: "Deploy {status}: {repo_name} {tag}"
- Color: from step 1
- Fields: Branch, Commit SHA, Author, Duration
- Footer: "Triggered by GitHub Actions"
- IF node (failure only) → Discord node → Send Message in
#incidents: "@here Deploy failed for {repo_name}"
Pattern 3: Daily Community Digest
Post a daily summary of the past 24 hours of activity in a Discord server — top threads, new members, pinned announcements.
Trigger: Schedule Trigger — every day at 9 AM
Steps:
- Discord node → Get All Messages from
#announcementschannel, since yesterday - Discord node → Get All Members who joined in the past 24 hours (filter by
joined_at) - Code node — format digest: list announcement titles, count new members
- Discord node → Send Message in
#daily-digest:
**Daily Digest — July 14**
📢 3 new announcements
👋 12 new members joined
Related Articles
- n8n Telegram Node: Send Messages, Handle Commands, and Build Bots
- n8n Microsoft Teams Node: Send Messages and Automate Team Notifications
- n8n GitHub Node: Automate Issues, Pull Requests, and Releases
- n8n Stripe Webhooks: Handle Payment Events Automatically
- n8n Slack Node: Send Messages, Create Channels, and Build Notification Workflows
Free Resource
Free: n8n Integration Checklist — 10-point checklist to audit any n8n integration before you ship it to production. Covers auth, error handling, rate limits, data validation, and monitoring. → Get it free here
Footer
Discord + n8n is the fastest way to build event-driven community automation without running a persistent bot process. Deploy alerts, member management, and daily digests all run on demand from n8n's workflow engine.
Need this built for your community? I offer a done-for-you n8n workflow build — you describe what you need, I build and test it, you import and run it. $99 flat. → Book here
Or grab the n8n Workflow Pack (30+ pre-built automations): → pirateprentice.gumroad.com/l/sxcoe ($29)
Top comments (1)
Are you using the n8n Discord node to send deploy alerts, manage community roles, or post daily digests? Drop your pattern in the comments — always curious what automation setups people are running in their Discord servers.