Course 2 Workflow 2 Discord Error - Cannot read properties of undefined (reading 'error')

Please, help :folded_hands:

Following instructions in the Course 2 Workflow 2:

  1. Use the Discord node to send a message in the n8n Discord channel #course-level-two. In the node, configure the following parameters:

    • Webhook URL: The Discord URL you received in the email when you signed up for this course.

    • Text: "I sent the file using email with the label ID {label ID}. My ID: " followed by the unique ID emailed to you when you registered for this course.
      Note that you need to replace the text in curly braces {} with expressions that reference the data from the nodes.

But when try to execute, get an error.

Error details:

Cannot read properties of undefined (reading ‘error’)

{
“errorMessage”: “Cannot read properties of undefined (reading ‘error’)”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.114.3 (Cloud)”,
“binaryDataMode”: “filesystem”,
“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_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/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_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/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_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/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_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Discord/v2/DiscordV2.node.ts:33:10)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1091:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1272:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1673:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2287:11"
]
}
}

I checked credentials, spaces in the message - all seems to be correct.

Also tried to send the same message to Telegram - it worked with no errors.

My workflow:

{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-32,
48
],
“id”: “8d76bcf8-51b9-468e-a2a2-f30e22fbeca5”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“url”: “https://internal.users.n8n.cloud/webhook/level2-erp”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “unique_id”,
“value”: “923972cc575502e87f1dc22828c90000”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
208,
0
],
“id”: “f0087d24-3d36-4b55-8b15-4b5ef7519a62”,
“name”: “HTTP Request”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “jCW28IIZELgQk1Px”,
“name”: “Header Auth account 2”
}
}
},
{
“parameters”: {
“operation”: “search”,
“base”: {
“__rl”: true,
“value”: “appMcVFP0X2X4jitp”,
“mode”: “list”,
“cachedResultName”: “n8n course L2”,
“cachedResultUrl”: “https://airtable.com/appMcVFP0X2X4jitp”
},
“table”: {
“__rl”: true,
“value”: “tblp93wd98DsT1CSM”,
“mode”: “list”,
“cachedResultName”: “customers”,
“cachedResultUrl”: “https://airtable.com/appMcVFP0X2X4jitp/tblp93wd98DsT1CSM”
},
“options”: {}
},
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 2.1,
“position”: [
224,
208
],
“id”: “5f4ad4c2-af3b-451a-94b4-53090ba4e479”,
“name”: “Search records”,
“credentials”: {
“airtableTokenApi”: {
“id”: “DsAbGz1ccN3xJC59”,
“name”: “Airtable Personal Access Token account”
}
}
},
{
“parameters”: {
“mode”: “combine”,
“advanced”: true,
“mergeByFields”: {
“values”: [
{
“field1”: “customerID”,
“field2”: “customerID”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.merge”,
“typeVersion”: 3.2,
“position”: [
432,
32
],
“id”: “64ddd575-783b-43cd-9031-407c51786dfc”,
“name”: “Merge”
},
{
“parameters”: {
“sortFieldsUi”: {
“sortField”: [
{
“fieldName”: “orderPrice”,
“order”: “descending”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.sort”,
“typeVersion”: 1,
“position”: [
576,
32
],
“id”: “82238c70-3e65-43b5-80e0-6f64b632368d”,
“name”: “Sort”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “ed9e7ecb-2f29-46b5-a9a8-5a90f39a2582”,
“leftValue”: “={{ $json.region }}”,
“rightValue”: “Americas”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
784,
32
],
“id”: “5c89c2fb-6811-44d7-9bba-086f2e8e36e3”,
“name”: “If”
},
{
“parameters”: {
“operation”: “toJson”,
“mode”: “each”,
“options”: {
“fileName”: “=orderID-{{ $json.orderID }}.json”
}
},
“type”: “n8n-nodes-base.convertToFile”,
“typeVersion”: 1.1,
“position”: [
1008,
32
],
“id”: “3b903546-ef03-4d62-b0db-11853cd6b476”,
“name”: “Convert to File”
},
{
“parameters”: {
“sendTo”: “[email protected]”,
“subject”: “=OrderID {{ $(‘Sort’).item.json.orderID }}”,
“message”: “=Here is OrderID {{ $(‘Sort’).item.json.orderID }}”,
“options”: {
“attachmentsUi”: {
“attachmentsBinary”: [
{}
]
}
}
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.1,
“position”: [
1200,
48
],
“id”: “0539a1a7-08e3-4274-9a2e-09321f4bea87”,
“name”: “Send a message”,
“webhookId”: “0b421a5a-0cb0-40e5-bb67-d3999f60cb2a”,
“credentials”: {
“gmailOAuth2”: {
“id”: “FQ72fURxYGjL8PqN”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“authentication”: “webhook”,
“content”: “=I sent the file using email with the label ID {{ $json.id }}. My ID: 923972cc575502e87f1dc22828c9000”,
“options”: {}
},
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 2,
“position”: [
1424,
48
],
“id”: “ef92ccd0-ac0b-43b2-899c-f347d6e92cc5”,
“name”: “Discord”,
“webhookId”: “ececedb9-5600-4580-9681-8562e1e40f43”,
“credentials”: {
“discordWebhookApi”: {
“id”: “vtGCaIpKW2H1ZEbg”,
“name”: “Discord Webhook account 2”
}
}
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
},
{
“node”: “Search records”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “Merge”,
“type”: “main”,
“index”: 0
}
]
]
},
“Search records”: {
“main”: [
[
{
“node”: “Merge”,
“type”: “main”,
“index”: 1
}
]
]
},
“Merge”: {
“main”: [
[
{
“node”: “Sort”,
“type”: “main”,
“index”: 0
}
]
]
},
“Sort”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “Convert to File”,
“type”: “main”,
“index”: 0
}
]
]
},
“Convert to File”: {
“main”: [
[
{
“node”: “Send a message”,
“type”: “main”,
“index”: 0
}
]
]
},
“Send a message”: {
“main”: [
[
{
“node”: “Discord”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “95c48cdb7d40845073683101328399de122aa7e56c152aefd259833a9f835a08”
}
}

Information on your n8n setup

  • n8n version: 1.114.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system:

I updated the version (to 1.114.4).

Restarted the workspace.

Recreated credentials.

And it started to work.

Yesterday I did the same (to version 1.114.3), it didn’t help.

1 Like

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