Level one / Notifying the team : JS not returning my Unique ID & not posting on Discord channel

Describe the issue/error/question

Currently doing the Level one course / Notifying the team section.

I have 2 problems:

  1. In the Discord Node, the JS script code isn’t returning my Unique ID (marked as [undefined] below) :

Expression (copy-pasted from the course) :
This week we have {{$json[“totalBooked”]}} booked orders with a total value of {{$json[“bookedSum”]}}. My Unique ID: {{$node[“HTTP Request”].parameter[“headerParameters”][“parameter”][0][“value”]}}

Return of item 1:
This week we have 16 booked orders with a total value of 2251.14. My Unique ID: [undefined]

  1. When I execute the Discord Node, the message doesn’t appear in the #course-level-1 channel.

What is the error message (if any)?

No error message.

Share the output returned by the last node

"
[
{
“success”:
true
}
]

Please share the workflow

Expected output:
This week we have 16 booked orders with a total value of 2251.14. My Unique ID: 123bla

Information on your n8n setup

  • **n8n version: 0.221.2
  • **Database you’re using (default: SQLite): SQLite
  • **Running n8n with the execution process [own(default), main]: self-host
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

Help would be much appreciated, losing my mind over this :grinning:

Cheers!
Tim

Here’s a few extra screenshots



Hey @TimB,

The HTTP Request node changed recently, to get the ID you would instead need to use $node["HTTP Request"].parameter["headerParameters"]["parameters"][0]["value"].

The message won’t appear in the channel if the message doesn’t contain the ID.

Worked great, thanks !!
I’d suggest updating the course with this bit of code, for future users :wink:

Hey @TimB,

It is on the list but sadly there are more items than time at the moment :slightly_smiling_face:

Will get it sorted soon though.

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