Error with Level 2 course Discord Webhook URL - Error Workflow

Describe the problem/error/question

I tried to send the error message to #course-level-2 channel, I corrected the format with no modifications or spaces done. I send the message with various attempts –> expressions, without expressions (answers only), tried to copy/paste the previous error message done in #course-level-2. Nothing worked.

Then I changed the place from my local host to the n8n cloud. And the done again the same things. But the issue persists. I even tried to downgrade the version to 1.82.1, but the downgrade option is no longer available in the n8n Manage place.

I even took advice, and tried many different format that the community suggested in various questions forum. Still the issue persists. I tried this for whole night.

What is the error message (if any)?

Error Message: Cannot read properties of undefined (reading ‘error’)

Please share your workflow

Share the output returned by the last node

Cannot read properties of undefined (reading ‘error’)

Information on your n8n setup

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

Can you check the raw JSON output from the Error Trigger node? see if it include execution.error, or only error at root level?

My suggestion: try fix #1 first (with ?. and fallbacks). That usually solves the “undefined” problem in n8n error handling.

You can try use an Optional Chaining in expressions
Change your Discord message expression to this:

The workflow {{$json.workflow.name}} failed.
Error message: {{$json.execution.error?.message || “No error message available”}}
Last node executed: {{$json.execution.lastNodeExecuted || “N/A”}}
Execution: {{$json.execution.url}}

Sometimes the error comes under $json.error, not $json.execution.error. Try this simpler message:

Workflow: {{$json.workflow.name}}
Error: {{$json.error.message || “Unknown error”}}
Node: {{$json.error.node || “N/A”}}
Execution: {{$json.execution.url}}

Hope this helps mate

Thanks for the suggested solutions, I appreciate it.

I tried your methods, but the issue still persists. Please check it in the attached screenshots.

Hello @Zoro_TheExplorer Congratulations, your badge tells me you got through Level 2. Could you help guide me on how you resolved the issue with the Discord Webhook URL please? I ran into the exact same problem. I even created a test channel of my own and was able to post to that from the same workflow via the linked webhook, but cant seem to post to the #course-level-2 even now.

Thanks in advance for any guidance you can provide with how you resolved your issue!

hi @Pranjali, I still didn’t resolve the error, in fact there are many still have this certain issue for their level 2 workflow exercise. I chatted with n8n AI discord bot about the solution, but still no results came. So, I moved on and taken the quiz directly, and I got the level 2 badge. The questions of level 2 quiz are mostly your understanding about the exercise, they are not asking us to do the workouts as we did in level 1.

So, I suggest you to move on to the quiz part and get the badge.

If you get the solution for the issue, Please share it. :slightly_smiling_face:

Thank you for responding! Im still trying to figure it out, I even reached out to the n8n team and they said the issue was with my workflow setup and I honestly cant figure it out, especially because I was able to create a test channel of my own and send the message in the correct format just fine. Also the test now has two “milestones”, Getting data from warehouse & Notifying the team, and the “Notifying the team” part is apparently not fulfilled until the discord messages go through, even if you pass the rest of the test, so I’m going to leave it be for now. Very disappointing to not be able to finish. :frowning:

hi @Pranjali , yeah, I also did create a test channel of my own and it worked. But for the n8n level 2 channel, there is a certain format the message needs to be send (that’s what I learned from other forums and bot chat).

But even if the format is correct, it is still giving the issue. So, don’t worry. It is not our fault. It is the course (n8n) fault. So, move on, and make your workflows :slightly_smiling_face:

Well, I haven’t got any answers to this. Did the issue resolved for someone? if so, please share their experience. It would be helpful.

Hi there,

was browsing for quite some time through the different channels and conversations here and it seems like the error still persists, since I received the same error on that webhook from Discord. For Level 1 its working fine but Level 2 not and it seems to be part for the qualifications because it also mentions “Notifying the team” which I then did but no answer yet :confused: Let’s hope this will be figured out or if someone knows what to do please share. I think I saw somewhere that hosting n8n locally might help so will probably try this next. Happy Friday.