Instantly Forward Any Webhook Event as a Discord Message to Your Server
Receive any incoming webhook payload and automatically post a formatted message to a Discord channel. Perfect for server admins who want real-time alerts from external apps without writing code.
- 1
Create a Webhook Trigger in n8n
Add a
Webhooknode as your trigger. Set theHTTP Methodto POST and note the generated webhook URL — this is the address you will give to any external service (GitHub, Stripe, a form tool, etc.) that should send events to Discord. SetResponse Modeto 'Last Node' so the caller gets a confirmation. - 2
Extract and Format the Payload
Add a
Setnode connected to the Webhook node. Create a new field calleddiscordMessagewith a value like:New event received: {{ $json.body.event ?? 'unknown' }} — {{ $json.body.message ?? JSON.stringify($json.body) }}. This turns the raw payload into a readable sentence. Adjust the field names to match whatever your external service actually sends. - 3
Send the Message to Discord
Add an
HTTP Requestnode connected to the Set node. SetMethodto POST and paste your Discord channel webhook URL into theURLfield (get this from Discord under Channel Settings > Integrations > Webhooks). SetBody Content Typeto JSON and add one body parameter: keycontent, value{{ $json.discordMessage }}. This is the text that will appear in your Discord channel.
Frequently asked questions
How do I get a Discord webhook URL?
Open Discord, right-click the channel you want messages in, choose Edit Channel, go to Integrations, click Webhooks, then Create Webhook. Copy the URL and paste it into the HTTP Request node's URL field in n8n.
Can I filter which events get posted to Discord?
Yes. Add an IF node between the Set node and the HTTP Request node. Set a condition such as `$json.body.event` equals the event name you care about. Connect the TRUE branch to the HTTP Request node and leave the FALSE branch empty so unmatched events are silently ignored.
What if I want richer Discord messages with embeds or colors?
Instead of sending a plain `content` field, change the HTTP Request body to include an `embeds` array following Discord's embed format. For example, add a `title`, `description`, and `color` field inside the embed object. You can build these values using the Set node before the HTTP Request.