$("<node-name>").item not working in IF node?

Hello there!

I’m almost sure this was working before… I use to take the below argument from the first webhook node in a certain step of my workflow, and I had to convert the red line into the green line to make it working again.
I also updated to the latest 1.x version just to check.

Is this a bug?

I just got another error after testing the new expression:

Hi @GBOL :wave: Sorry you’re running into this!

Edit: Just had a peek into some issues other users have been running into.

$('Node name').item and $node["Node name"] do different things, so this might be what’s causing some confusion :see_no_evil: The legacy expression $node["node name"] would reference items from a previous node by item index, whereas $('node name').item makes uses of item linking (previously called item pairing). Item pairing is not new functionality related to v1, item pairing was first introduced with n8n 0.180 around a year ago.

v1 also now throws this error to make you aware of a problem that was previously present in your expression, as it’s expecting a different data structure. My teammate @MutedJam explained this in another thread here:

Can you try out the expression {{ $('webhook').first().json.body.is_test }} and see if that works? If not, can you please share a workflow that doesn’t require any outside credentials / has sample data that we can look into?


Thanks @EmeraldHerald !
Your suggested expression have worked!
Is there any updated documentation on the supported expressions?

1 Like

Glad to hear it worked!

I know there’s some updates coming to the expressions documentation, but I wouldn’t have an estimate as to when that change will be :see_no_evil:

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