Auto-lift Shortcut References to Full/Strict References in Expressions

The idea is:

When there are expressions in an existing node that use the shortcut references like $json.whateverField or $input.item.json.whateverField, automatically “lift” those to fully specified $('Previous Node Name').item.json.whateverField when anything is done that would invalidate the shortcut reference.

My use case:

When I insert a node between 2 other nodes and the second node uses expressions with shortcuts referencing the previous node, if it isn’t a “passthrough” node like if, it is then necessary to manually edit the expressions such that they reference the now-second-previous node by name.

I think it would be beneficial to add this because:

This would save editing time in a scenario that is VERY common, and make it less necessary to “get ahead of it” by always starting with the full/strict reference format in all expressions (i.e. make it less of a hassle to use of the shortcut references until the other type is needed).

Any resources to support this?

n/a

Are you willing to work on this?

maybe

Paid job? I don’t know what you are asking. This is a feature request. This section of the forums is for anyone to describe an idea they want the n8n developers to consider adding to the product. I’m sure if you wanted to volunteer to develop it, you could fork the n8n source, make the changes, submit a merge request, and see how it goes.