# Error sending message to Discord via webhook

**URL:** <https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152>\
**Category:** Questions\
**Tags:** webhook, discord\
**Created:** [July 18, 2025, 8:38pm UTC](https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152 "2025-07-18T20:38:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SkippyTheMagnificent](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/skippythemagnificent/32/45668_2.png) [@SkippyTheMagnificent](https://community.n8n.io/u/SkippyTheMagnificent)\
**Post date:** [July 18, 2025, 8:38pm UTC](https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152/1 "2025-07-18T20:38:48Z")

</div>

I’m trying to send the summary of a workflow to a private channel in a discord server. I’m not trying to do anything fancy, such as react to anything in the channel, I’m just trying to “dump” the results via a webhook. For some reason, the node keeps erroring out and I’m not sure if it’s a permissions thing or what. FWIW, I can successfully “curl” the webhook sending data just fine from the N8N node’s host, even though N8N itself is running on that node in Kubernetes. Shelling into the pod itself, I CAN ping [discord.com](http://discord.com) and resolve to a valid IP address, but due to apk being locked down in the Docker container, you can’t do much more than ping or nslookup.

Here is a copy/pasta stacktrace of the error from the node:

```auto
{
  "errorMessage": "Cannot read properties of undefined (reading 'error')",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.102.4 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "TypeError: Cannot read properties of undefined (reading 'error')",
      " at ExecuteContext.parseDiscordError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/helpers/utils.ts:32:30)",
      " at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/webhook/sendLegacy.operation.ts:153:34)",
      " at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      " at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/actions/router.ts:70:17)",
      " at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/Discord/v2/DiscordV2.node.ts:33:10)",
      " at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@5.8.1_ws@8.17.1_zod@3.25.67_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9)",
      " at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@5.8.1_ws@8.17.1_zod@3.25.67_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27",
      " at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@5.8.1_ws@8.17.1_zod@3.25.67_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2153:11"
    ]
  }
}

```

and the node itself:

Any help moving beyond this would be immensely appreciated!

## Information on your n8n setup

- **n8n version:** 1.102.4
- **Database (default: SQLite):** Postgresql
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker in Kubernetes
- **Operating system:** K8S nodes: Debian 12

---

<div class="post-metadata">

**Author:** ![Poly\_Agency](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/poly_agency/32/60483_2.png) [@Poly\_Agency](https://community.n8n.io/u/Poly_Agency)\
**Post date:** [July 18, 2025, 8:40pm UTC](https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152/2 "2025-07-18T20:40:38Z")

</div>

Hi Skippy,

You’re on the right track narrowing it down to the Discord webhook call. When n8n throws that undefined error it usually means the Discord API returned a non-JSON body or a non-2xx status that the node didnt parse.

A quick framework I use for webhook issues:

1. Confirm the webhook URL includes /webhooks/{id}/{token} exactly and no extra path segments.
2. 
  1. Send a minimal payload first (content field only) using the HTTP Request node in POST mode to verify the endpoint outside of the Discord node.

3. 
  1. Check the response status and headers in the execution log; Discord often replies with 204 No Content for success. Any 4xx will include a JSON message field that hints at missing permissions.  
A couple of questions to pinpoint it:  
 Is the channel a private thread under a public channel or a standalone private channel?  
 Does the bot have the Send Messages permission in that channel and is the webhook owner role still active?

Typical next steps:  
 Regenerate the webhook in Discord to get a fresh token, then update the credentials in n8n.  
 If running behind a proxy check that the outbound request isnt being rewritten to HTTP/1.0 which Discord rejects.

This is general guidance based on my experience with similar projects.

---

<div class="post-metadata">

**Author:** ![SkippyTheMagnificent](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/skippythemagnificent/32/45668_2.png) [@SkippyTheMagnificent](https://community.n8n.io/u/SkippyTheMagnificent)\
**Post date:** [July 18, 2025, 8:53pm UTC](https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152/3 "2025-07-18T20:53:59Z")

</div>

Thanks for the quick reply!

I’ll answer each bullet above here:

1. I’ve done that. Copy pasted it into a text editor just for sanity’s sake and it is in the expected format: ` https://discord.com/api/webhooks/{id}/{token}` with no trailing anything else.
2. Also tried that, as the paste of the node above shows, I’ve removed all content and replaced it with the text `test`, same result.
3. That’s part of the problem, I can’t see any result codes being sent back from within N8N, I just get the stacktrace I pasted in the original message. Tailing the output from the pod, I get only `Cannot read properties of undefined (reading 'error')` in the pod’s output. I have to get the actual stacktrace from the N8N gui.

It is a top-level channel that is marked as Private (It has the hashmark with a tiny padlock on it) and the channel SAYS that the bot has send message permissions enabled on it, but I’ll try regenerating a new webhook and re-setting permissions.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 16, 2025, 8:54pm UTC](https://community.n8n.io/t/error-sending-message-to-discord-via-webhook/152152/4 "2025-10-16T20:54:22Z")

</div>

Closed on October 16, 2025, 8:54pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
