To use n8n with Discord, you can integrate them to automate various workflows — for example, sending messages to a Discord channel when an event happens (e.g., a new user signs up, a form is submitted, etc.). Here's how to set it up step-by-step:
🔧 Step-by-Step Guide: Integrate n8n with Discord
✅ 1. Create a Discord Webhook
- Go to your Discord server.
- Click the gear icon next to your target channel (channel settings).
- Go to Integrations → Webhooks → click "New Webhook".
- Name your webhook and select a channel.
- Copy the Webhook URL.
🔁 2. Create a New Workflow in n8n
- Go to your n8n dashboard.
- Click "New Workflow".
- Add a trigger node (e.g., Webhook, Schedule, Gmail, etc.), depending on what should trigger the message.
📤 3. Add a HTTP Request Node to Send Message to Discord
- Click the "+" button and choose HTTP Request.
- Configure it like this:
HTTP Request Settings:
- HTTP Method:
POST
- URL: Paste the Discord Webhook URL
- Content Type:
JSON
- Body Parameters (JSON):
{
"content": "Hello from n8n! 🎉"
}
You can dynamically insert content from previous nodes using expressions (e.g., {{$json["name"]}} joined!)
📌 4. Connect and Activate
- Connect your trigger node to the HTTP Request node.
- Save and Activate the workflow.
- If using the Webhook trigger, open the webhook test URL and watch Discord for the message.
💡 Example Use Cases
- Post alerts to Discord when:
- You get a new order
- A form is submitted (e.g., Typeform, Google Forms)
- A new RSS item is published
- Moderation alerts based on Discord message content (advanced with Discord APIs)
🔐 Bonus: Authenticate with Discord Bot (Advanced)
If you need to read or respond to messages, you’ll need to:
- Create a Discord Bot in the Discord Developer Portal
- Get the Bot Token and add your bot to the server
- Use Discord API endpoints with
HTTP Request nodes, passing the token as Authorization: Bot YOUR_TOKEN
This requires more setup and is only needed if you're not just using webhooks.
Below is a real-world use case along with the ready-to-import n8n workflow JSON that sends a custom message to a Discord channel using a webhook. You can modify it as needed.
✅ Use Case: Send Discord Notification When a New Item is Posted in RSS Feed
🔔 Scenario:
You want to monitor an RSS feed (e.g., news, blog) and send a notification to a Discord channel whenever a new item is published.
🛠️ Step-by-Step Summary
- Use the RSS Feed Read node to fetch items.
- Use the IF node to check if the post is new.
- Use the HTTP Request node to send the message to Discord.
📦 Sample n8n Workflow JSON
Here's the JSON you can import directly into n8n:
{
"nodes": [
{
"parameters": {
"url": "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
},
"id": "RSS",
"name": "RSS Feed",
"type": "n8n-nodes-base.rssFeedRead",
"typeVersion": 1,
"position": [300, 300]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"isoDate\"]}}",
"operation": "isAfter",
"value2": "={{$workflow.upTime}}"
}
]
}
},
"id": "IF_NewItem",
"name": "Check if New",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [500, 300]
},
{
"parameters": {
"url": "https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN",
"method": "POST",
"contentType": "application/json",
"bodyParametersJson": "={\n \"content\": \"📰 New Post: {{$json[\"title\"]}}\\n{{$json[\"link\"]}}\"\n}"
},
"id": "Discord_Message",
"name": "Send to Discord",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [700, 300]
}
],
"connections": {
"RSS Feed": {
"main": [
[
{
"node": "Check if New",
"type": "main",
"index": 0
}
]
]
},
"Check if New": {
"main": [
[
{
"node": "Send to Discord",
"type": "main",
"index": 0
}
]
]
}
}
}
🔁 Replace "https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN" with your actual Discord Webhook URL.
📥 How to Import this Workflow
- Go to n8n Dashboard.
- Click the hamburger menu (☰) > Import.
- Paste the JSON above.
- Replace the Webhook URL.
- Hit Execute Node or Activate the workflow.
Would you like a Discord Bot version (with API + Bot Token) or more advanced interaction examples like sending embeds or replying to users?