How to Connect n8n to Discord: Build Community Bots and Alerts (2025 Guide)
Discord runs communities, SaaS support channels, online courses, and creator audiences. n8n connects to it two ways — simple webhooks for one-directional alerts, and a full bot token for interactive, two-way automations. This guide covers both, so you can start with a five-minute alert and grow into an AI-powered community bot.
Two ways to connect: webhooks vs bot token
A Discord webhook is the fastest path: create it in a channel's settings and n8n can post messages to that channel instantly, no bot required. A bot token is more powerful — it lets your automation read messages, respond to commands, manage roles, and interact with members. Use webhooks for notifications; use a bot for anything conversational.
Step 1 — The fast path: channel webhooks
In Discord, open Channel Settings → Integrations → Webhooks → New Webhook, name it, and copy the URL. In n8n, add a Discord node (or a plain HTTP Request node) pointed at that URL, and you can post rich messages with embeds, colors, and mentions. This is perfect for deploy alerts, new-sale notifications, or daily digests to your team.
Step 2 — Create a Discord bot for two-way automation
For interactivity, go to the Discord Developer Portal, create an Application, add a Bot, and copy its token. Enable the Message Content Intent if your bot needs to read messages. Invite the bot to your server with the correct permissions using the OAuth2 URL generator. Store the bot token as a credential in n8n.
⚡ Skip the build — get the ready-made template
Go beyond alerts — this template is a full Discord RAG bot that answers member questions from your own docs and course content, 24/7.
Get "Discord Bot with RAG for Communities and Online Courses" on Gumroad →
Step 3 — Send messages and embeds
The Discord node sends plain text or rich embeds — great for formatting alerts with titles, fields, and colors that draw the eye. Use mentions (@role or @user) to make urgent alerts impossible to miss, and post to different channels based on the event so support, sales, and ops each see only what's relevant to them.
Step 4 — React to messages and commands
With a bot token, you can trigger n8n workflows from Discord activity. A common setup listens for messages in a support channel, passes the question to an AI node, and posts an answer back in the thread. Slash commands and keyword triggers let members interact with your automations directly, turning Discord into a front-end for your whole stack.
A real example: an AI community bot
The most valuable Discord automation is a knowledge bot: a member asks a question, the bot retrieves the answer from your documentation or course material using RAG, and replies in seconds. For communities and online courses, this deflects repetitive questions around the clock and keeps members engaged without burning out your team.
Troubleshooting
If your bot can't read messages, you forgot to enable the Message Content Intent. If it can't post, check its channel permissions. And if webhook messages fail, the URL may have been regenerated — Discord invalidates the old one whenever you reset a webhook.
Ready to automate? Get this template on Gumroad →
Import the JSON, plug in your credentials, and it runs in minutes.