BUG - Dangerous default behavior with previous node reference

Consider the Wait node in this simple loop:

When I drag this parameter in it references the default $json

However that is only correct on the FIRST execution. In subsequent executions its gone and as a result, the Wait hangs.

This should actually be an EXPLICIT reference to the previous node:
{{ $(‘Snap Poll Frequency’).item.json.poll_interval }}

I had to type this in by hand to fix the bug.

This takes very advanced understanding of n8n to figure out and debug… I would suggest this sort of drag should always default to explicit reference as that is more likely what the user wants.

I think the reason is to understand that $json means the incoming input.

But in your scenario. There is a loop from IF node.

IF -> wait

It make the IF node to be previous node.

In most case. There will be no loop like you did. Maybe more than 90%.

$json is still a convenient shorthand.


But still you can open a feature request about if dragging field from previous node. Use the $('node_name').item.json rather than $json

That is what im asking for – change the default behavior to explicitly reference the node you drag from.