More stable node referencing: prefer $node[] over $json

Hey everyone,

I wanted to share something that keeps causing issues in larger workflows.

Right now, when building expressions, n8n defaults to using $json, which references the current incoming item. The problem is that as soon as you reorder nodes, move things around, or branch the workflow differently, all expressions relying on $json can break or start pulling unexpected data.

A much more stable approach is to always use:

$node["Node Name"].json

(or the shorthand)

$('Node Name').json

These references stay consistent no matter how the workflow structure changes. They don’t depend on the incoming data of the current node, only on the explicit node name.

It would be great if n8n could:

  • Encourage the use of $node references by default

  • Or give users an option to choose a preferred reference style in the expression editor

  • Or at least warn when $json might not be stable depending on workflow structure

This would help prevent a lot of breakage in complex workflows.

Would love to hear what others think!