N8N Course Level 1 not sending discord message
Describe the problem/error/question
Im getting an error saying:
message: Your message is incorrectly formatted
when trying to send a message on the N8N discord course level 1.
Webhook url used: https://learn.app.n8n.cloud/webhook/course-level-1 (the ones that’s sent on the email)
Node: Discord, Send a message, Connection type is Webhook
Workflow:
{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
0,
0
],
“id”: “e0e88190-eb6b-43ab-8c4d-81cd645c70bd”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“url”: “https://internal.users.n8n.cloud/webhook/custom-erp”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “unique_id”,
“value”: " 186558404f674f0cb3b819fe5fbc92fa"
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [
208,
0
],
“id”: “4b7decba-cc6b-40c3-9677-27b70b8172e5”,
“name”: “HTTP Request”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “iP0rmGlJp1YjGDyg”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“jsCode”: “let items = $input.all();\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor (let i=0; i < items.length; i++) {\n bookedSum = bookedSum + items[i].json.orderPrice;\n}\n\nreturn [{ json: {totalBooked, bookedSum} }];”
},
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
672,
112
],
“id”: “94e31de0-3aa4-472c-95db-e234ed3390da”,
“name”: “Code in JavaScript”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “50a8a67b-cf0d-475c-af58-fa98971ff3a8”,
“leftValue”: “={{ $json.orderStatus }}”,
“rightValue”: “processing”,
“operator”: {
“type”: “string”,
“operation”: “equals”
}
},
{
“id”: “8089d424-07e2-40f6-b0b7-28d24a614122”,
“leftValue”: “={{ $json.employeeName }}”,
“rightValue”: “=Mario”,
“operator”: {
“type”: “string”,
“operation”: “equals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.3,
“position”: [
416,
0
],
“id”: “a308e9c5-0aa0-4b7c-b310-4c8572ff1a14”,
“name”: “If”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “0d3f9d56-4968-4774-a2be-9a8dc2a08c0d”,
“name”: “orderID”,
“value”: “={{ $json.orderID }}”,
“type”: “number”
},
{
“id”: “0a5ff636-c825-4bb8-810e-7daaac5cd5aa”,
“name”: “employeeName”,
“value”: “={{ $json.employeeName }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
800,
-176
],
“id”: “58583160-54b9-4018-8835-17099ce2a322”,
“name”: “Edit Fields”
},
{
“parameters”: {
“operation”: “create”,
“base”: {
“__rl”: true,
“value”: “app8Ah8pkibKYLUJV”,
“mode”: “list”,
“cachedResultName”: “Untitled Base”,
“cachedResultUrl”: “https://airtable.com/app8Ah8pkibKYLUJV”
},
“table”: {
“__rl”: true,
“value”: “tbl8LUAdwe4kpwu6m”,
“mode”: “list”,
“cachedResultName”: “orders”,
“cachedResultUrl”: “https://airtable.com/app8Ah8pkibKYLUJV/tbl8LUAdwe4kpwu6m”
},
“columns”: {
“mappingMode”: “defineBelow”,
“value”: {
“orderID”: “={{ $json.orderID }}”,
“customerId”: “={{ $(‘If’).item.json.customerID }}”,
“orderPrice”: “={{ $(‘If’).item.json.orderPrice }}”,
“employeeName”: “={{ $(‘If’).item.json.employeeName }}”,
“orderStatus”: “={{ $(‘If’).item.json.orderStatus }}”
},
“matchingColumns”: ,
“schema”: [
{
“id”: “orderID”,
“displayName”: “orderID”,
“required”: false,
“defaultMatch”: false,
“canBeUsedToMatch”: true,
“display”: true,
“type”: “number”,
“readOnly”: false,
“removed”: false
},
{
“id”: “customerId”,
“displayName”: “customerId”,
“required”: false,
“defaultMatch”: false,
“canBeUsedToMatch”: true,
“display”: true,
“type”: “number”,
“readOnly”: false,
“removed”: false
},
{
“id”: “employeeName”,
“displayName”: “employeeName”,
“required”: false,
“defaultMatch”: false,
“canBeUsedToMatch”: true,
“display”: true,
“type”: “string”,
“readOnly”: false,
“removed”: false
},
{
“id”: “orderPrice”,
“displayName”: “orderPrice”,
“required”: false,
“defaultMatch”: false,
“canBeUsedToMatch”: true,
“display”: true,
“type”: “number”,
“readOnly”: false,
“removed”: false
},
{
“id”: “orderStatus”,
“displayName”: “orderStatus”,
“required”: false,
“defaultMatch”: false,
“canBeUsedToMatch”: true,
“display”: true,
“type”: “string”,
“readOnly”: false,
“removed”: false
}
],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
},
“options”: {}
},
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 2.2,
“position”: [
992,
-96
],
“id”: “b56c2be3-2005-4f80-b795-d160a8b08daa”,
“name”: “Create a record”,
“credentials”: {
“airtableTokenApi”: {
“id”: “2OnDNzYQZRUUE196”,
“name”: “Airtable Personal Access Token account”
}
}
},
{
“parameters”: {
“jsCode”: “let items = $input.all();\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor (let i=0; i < items.length; i++) {\n bookedSum = bookedSum + items[i].json.orderPrice;\n}\n\nreturn [{ json: {totalBooked, bookedSum} }];”
},
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [
656,
-272
],
“id”: “ff026b1a-18bd-4fc0-b3a8-12a1ec3c6a1f”,
“name”: “Code in JavaScript1”
},
{
“parameters”: {
“authentication”: “webhook”,
“content”: “=This week we have {{$json[“totalBooked”]}} booked orders with a total value of {{$json[“bookedSum”]}}. My Unique ID: 186558404f674f0cb3b819fe5fbc92fa”,
“options”: {}
},
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 2,
“position”: [
896,
112
],
“id”: “32c46693-b667-40c2-b97a-637c9d3cc21a”,
“name”: “Discord”,
“webhookId”: “46efec0f-e6b8-42a9-a5a0-ce6eec17932a”,
“credentials”: {
“discordWebhookApi”: {
“id”: “OYkQTIY6mA1prtip”,
“name”: “Discord Webhook account”
}
}
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“Code in JavaScript”: {
“main”: [
[
{
“node”: “Discord”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “Code in JavaScript1”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Code in JavaScript”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “Create a record”,
“type”: “main”,
“index”: 0
}
]
]
},
“Code in JavaScript1”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “250d539ea0c1bc711e4ef23e40436dc4a539dd66cb804b1f89cd13019c2dcf2e”
}
}