Steps
How we tested, and what is real
We ran 20 workflows with the Discord node v2, Connection Type Webhook, operation Send a Message, on n8n 2.43.7 with
n8n execute. To make Discord fail on purpose (deleted webhook, rate limit, form errors) we set the credential's Webhook URL to a small local stand-in that logs every request and answers with the error JSON Discord documents. So what n8n sends and how it reports errors is real; the Discord answers are simulated."Cannot send an empty message": the Content expression is empty
n8n still sends the request when Content is empty, and Discord rejects it with
Cannot send an empty message. This is usually an expression like{{ $json.msg }}pointing at a field that is missing or empty on that item. Fix the field, filter out empty items with a Filter node first, or add a fallback:{{ $json.msg || '(no text)' }}. A message with an embed and no Content was delivered fine."Invalid Form Body": n8n hides the reason
Two very different mistakes gave the same short error,
Invalid Form Body: Content longer than 2000 characters, and a Username option that contains the worddiscord(Discord forbids it). Discord's reply names the field, but n8n did not show it in our runs. n8n does not split long text: cut it to 2000 characters or split it into several items (Code node below). And pick a username withoutdiscordin it."Unknown Webhook", "Invalid Webhook Token" and "404: Not Found"
Unknown Webhookmeans the webhook ID no longer exists: someone deleted it, or the channel was removed.Invalid Webhook Tokenmeans the ID is right but the token part is wrong, which is what you get after Regenerate or a half-pasted URL; copy the full URL again from Server Settings > Integrations > Webhooks into the n8n credential.404: Not Foundcame from a URL that is not a webhook URL at all, such as a channel link. A trailing slash on a correct URL was fine."You are being rate limited." is not retried
When our stand-in answered 429 with
retry-after: 2, n8n sent one request and failed withYou are being rate limited.; it did not wait and try again, even when a second try would have worked. Turn on Settings > Retry On Fail with a wait of 2000 ms or more, or pace bursts with Loop Over Items and a Wait node. Discord's documented limit for one webhook is about 5 requests per 2 seconds. Options compared in n8n 429 rate limits.No message id in the output? Turn on Wait
By default n8n posts without
?wait=true, Discord answers 204 with no body, and the node outputs only{"success": true}. With Options > Wait on, n8n added?wait=trueand returned the whole message, including itsid. You need that id to edit or delete the message later.Embeds: Raw JSON, URLs and colors
Embed Raw JSON must be strict JSON:
{title: 'x'}failed before anything was sent withExpected property name or '}' in JSON at position 1andNot a valid JSON; use{"title": "x"}. An embed URL withouthttps://was sent and then failed withThe parameter Url is not properly formatted. A color written as#ff0000was converted to the number Discord expects, so hex is fine.Objects, @everyone and one bad item
An expression that returns an object (
{{ $json.data }}) was sent as a raw JSON object incontent, which Discord documents as a string; use{{ JSON.stringify($json.data) }}or pick one field. n8n sends noallowed_mentions, so@everyonein your text is left to Discord's default; Discord's docs say webhooks can ping it if the webhook has that permission. With 3 items and an empty item 2, item 1 was posted and item 3 was never sent; running again posts item 1 a second time. Set Settings > On Error > Continue (using regular output) and all items are attempted.
All 20 test results
Left: what we sent through the Discord node (Connection Type Webhook, operation Send a Message). Right: what n8n did (real) and the answer from our Discord stand-in (simulated, see the first step).
| Test | Result |
|---|---|
Hello world, defaults | Delivered (stand-in answered 204). n8n output was only {"success": true}, no message id |
| Same with Options > Wait on | n8n added ?wait=true to the URL and output the full message object with its id |
| Empty Content | Request still sent; error Cannot send an empty message |
| Content of 2,100 characters | Sent in one piece, not split; error only Invalid Form Body (the reason, 2000 characters max, was not shown) |
Username option containing discord | Error only Invalid Form Body, again without the reason |
| Webhook deleted in Discord | Unknown Webhook |
| Wrong token part of the URL | Invalid Webhook Token |
| Channel URL instead of a webhook URL | 404: Not Found |
Rate limited once (429, retry-after: 2) | One request only, then You are being rate limited.; n8n did not wait and retry |
| Rate limited on every call | Same error, one request |
Embed color #ff0000 | Converted to the number 16711680, delivered |
Embed Raw JSON written as {title: 'x'} | Failed before sending: Expected property name or '}' in JSON at position 1, Not a valid JSON |
Embed URL example.com (no https) | Sent, then The parameter Url is not properly formatted |
| Content expression returning an object | Sent as a raw JSON object, "content": {"a": 1}, not as text |
| 3 items, item 2 empty | Item 1 delivered, item 2 failed, item 3 never sent |
| Same, On Error set to Continue (regular output) | All 3 attempted, items 1 and 3 delivered |
| Webhook host not reachable | The service refused the connection - perhaps it is offline |
| Webhook URL with a trailing slash | Delivered |
| Embed only, Content empty | Delivered |
@everyone deploy done | Sent with no allowed_mentions, so the mention is left to Discord's default |
Code node: split long text into 2000-character messages
Put this before the Discord node and set its Content to {{ $json.text }} (written from Discord's documented limit; this exact snippet was not run):
const text = $input.first().json.text || '';
const parts = [];
for (let i = 0; i < text.length; i += 1900) parts.push(text.slice(i, i + 1900));
return parts.map(t => ({ json: { text: t } }));Checklist
- Content not empty, under 2000 characters, and a string (wrap objects in
JSON.stringify()). - The credential holds the full URL
https://discord.com/api/webhooks/ID/TOKEN, copied again after any regenerate. - No
discordin the Username option. - Embed URLs start with
https://; Raw JSON uses double quotes. - Wait on if you need the message id.
- Retry On Fail or a Wait node for bursts, On Error Continue for many items.
Good to know
- Slack node failing with
invalid_authornot_authed: n8n Slack node not working. - New to webhooks? Create one and send your first message with curl in Discord webhooks for beginners.
- Posting a feed? RSS to Discord with n8n and GitHub releases and issues to Discord use the same webhook.
- Sending to Telegram too? That node has its own traps (Markdown by default, an attribution line): n8n Telegram node not working.
- Pacing options for 429s are compared in n8n 429 rate limits.
- Every error text from our n8n guides is in the n8n error message index.
What we did not test
The real discord.com API (answers came from our stand-in, built from Discord's documented error codes), the Bot Token and OAuth2 connection types, other operations, file attachments, the editor's own error panel, and n8n Cloud.
Start from a working agent
FAQ
Why does the n8n Discord node say "Cannot send an empty message"?
The Content field was empty for that item, usually because its expression points at a missing field. n8n still sends the request and Discord rejects it. Fix the field, filter empty items out, or send an embed.
What does "Invalid Form Body" mean in the n8n Discord node?
Discord rejected one field, and n8n does not say which. In our tests it was Content over 2000 characters or a username containing the word discord.
How do I fix "Invalid Webhook Token" or "Unknown Webhook" in n8n?
Copy the full webhook URL again from the Discord channel settings into the n8n credential. Invalid token means the URL was regenerated or cut off; unknown webhook means it was deleted.
Does the n8n Discord node retry when rate limited?
Not in our n8n 2.43.7 tests: one 429 failed the node straight away. Turn on Retry On Fail with a 2-second wait, or space messages with a Wait node.
How do I get the message id from the n8n Discord node?
Turn on Options > Wait. n8n then adds ?wait=true and outputs the full message, including its id. Without it the output is only success: true.
Why did only the first Discord message send in n8n?
One failing item stops the node, so the items after it are never sent. Set On Error to Continue (using regular output).
Related guides
- n8n OpenAI node not working? 18 tests, every error decoded
- n8n Respond to Webhook not working: empty body, Invalid JSON, 28 runs
- n8n Simple Vector Store not working? 23 tests, every error decoded
- n8n expression errors and empty values: 29 tests, every message explained
- Get notified when a website changes: free alerts in Discord or Telegram
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes