Course-level-1 outcome not being updated into Discord Channel

Describe the issue/error/question

Working through the Level-1 training and am blocked at the stage where my Workflow updates my progress into the Discord Channel “course-level-1”.

What is the error message (if any)?

No Error message, workflow runs just fine.

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
-780,
300
]
},
{
“parameters”: {
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“url”: “https://internal.users.n8n.cloud/webhook/custom-erp”,
“options”: {
“splitIntoItems”: true
},
“headerParametersUi”: {
“parameter”: [
{
“name”: “unique_id”,
“value”: “recY9TXVKNCpebKRi”
}
]
}
},
“name”: “HTTP Request”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 2,
“position”: [
-580,
300
],
“credentials”: {
“httpHeaderAuth”: {
“id”: “4”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“operation”: “append”,
“application”: “app8cTsfXoYIyflzM”,
“table”: “processingOrders”,
“options”: {}
},
“name”: “Airtable”,
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 1,
“position”: [
120,
100
],
“credentials”: {
“airtableApi”: {
“id”: “6”,
“name”: “Airtable account”
}
}
},
{
“parameters”: {
“conditions”: {
“string”: [
{
“value1”: “={{$json[“orderStatus”]}}”,
“value2”: “processing”
}
]
}
},
“name”: “IF”,
“type”: “n8n-nodes-base.if”,
“typeVersion”: 1,
“position”: [
-400,
300
]
},
{
“parameters”: {
“keepOnlySet”: true,
“values”: {
“number”: [
{
“name”: “orderID”,
“value”: “={{$json[“orderID”]}}”
}
],
“string”: [
{
“name”: “employeeName”,
“value”: “={{$json[“employeeName”]}}”
}
]
},
“options”: {}
},
“name”: “Set”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
-160,
100
]
},
{
“parameters”: {
“functionCode”: “// Code here will run only once, no matter how many input items there are.\n// More info and help: https://docs.n8n.io/nodes/n8n-nodes-base.function\n// Tip: You can use luxon for dates and $jmespath for querying JSON structures\n\nlet totalBooked = items.length;\nlet bookedSum = 0;\n\nfor(let i=0; i < items.length; i++) {\n bookedSum = bookedSum + items[i].json.orderPrice;\n}\nreturn [{json:{totalBooked, bookedSum}}];”
},
“name”: “Function”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
-180,
340
]
},
{
“parameters”: {
“webhookUri”: “n8n Course Redirect”,
“text”: “=This week we have {{$json[“totalBooked”]}} booked orders with a total value of {{$json[“bookedSum”]}}. My Unique ID:{{$node[“HTTP Request”].parameter[“headerParametersUi”][“parameter”][0][“value”]}}”,
“options”: {}
},
“name”: “Discord”,
“type”: “n8n-nodes-base.discord”,
“typeVersion”: 1,
“position”: [
40,
340
]
},
{
“parameters”: {
“triggerTimes”: {
“item”: [
{
“mode”: “everyWeek”,
“hour”: 9
}
]
}
},
“name”: “Cron”,
“type”: “n8n-nodes-base.cron”,
“typeVersion”: 1,
“position”: [
260,
340
]
}
],
“connections”: {
“Start”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “IF”,
“type”: “main”,
“index”: 0
}
]
]
},
“IF”: {
“main”: [
[
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Function”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set”: {
“main”: [
[
{
“node”: “Airtable”,
“type”: “main”,
“index”: 0
}
]
]
},
“Function”: {
“main”: [
[
{
“node”: “Discord”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

Share the output returned by the last node

This week we have 16 booked orders with a total value of 2251.14. My Unique ID: recY9TXVKNCpebKRi

Information on your n8n setup

Can you copy and paste your flow in? There might be something like a channel that is wrong.

Done, In the placeholder above for the workflow.

Hey @BlueGrass,

Just looking into this now, It does look like the issue is something on our side just digging through the information now.

Hey @BlueGrass,

Can you set the text to

This week we have {{$json["totalBooked"]}} booked orders with a total value of {{$json["bookedSum"]}}. My Unique ID: {{$node["HTTP Request"].parameter["headerParametersUi"]["parameter"][0]["value"]}}
1 Like

It worked after I updated the Text Block with what you have suggested.

Wondering what was the issue, trying to understand so that I don’t stumble upon it again.

Thanks you!

Hey @BlueGrass,

It is a bit of a silly issue but the quick version is the text we provide in the course has a space between ID: and the value you need to use. In our backend we look for that space to work out where the ID is but we couldn’t find it so ended up looking for your ID as ID:recY9TXVKNCpebKRi instead of recY9TXVKNCpebKRi.

This is something we plan to resolve in the future so this doesn’t happen again.