When you drag a data pill into a node, it should automatically default to the full JSON path.
For example, for a field named Video link:
It should never default to the short version with a node: {{ $json[‘Video Link’] }}
It would always default to {{ $(‘NODE_NAME’).item.json[‘Video Link’] }}
Also, when you go to change a node name, it should automatically update all existing in use nodes expressions with that name.
This would be a major continuity fix that would save lots of time having to go back and update when renaming nodes. A lot of developers build things in different orders, and when you add steps in between existing steps, you end up with multiple fields named the same thing and the nodes get confused with it and populate the wrong data because it can’t determine whether {{ $json[‘XYZ’] }} is from the 1st node version of it, 2nd node version of it or 3rd… etc. I rarely know what I should name the the node until im done building and testing with it. Then I have to go back and change the expressions.
My use case:
See above
I think it would be beneficial to add this because:
I have 5+ years of workflow development experience in Servicenow. This was easily the biggest quality of life change to Flow Designer and is an approach most professional low-code/no code workflow platforms take.
If expressions don’t auto-update on rename, that’s a bug we should fix.
As for always using the absolute path rather than the relative one, it’s not a problem I’ve personally had so I’m wondering if we architect/build our workflows differently.
Would you be able to share a video of rename breaking expressions plus a real-life workflow of a scenario where you find yourself wishing we didn’t have relative expressions?
I believe this is a real problem for you and I’d just like to understand your setup better. Thanks!
Yeah, I’ve seen it break both ways (node rename and field name rename)… but right now, I can only re-create field name. Unsure if you guys patched something recently that fixed node renaming or if there is more layers to the bug. I just worked through it tbh, but if i see it again, I’ll stop.
Below is same workflow, just copied, dragged both fields into node3 then renamed node1 and renamed field name on node2. Node name rename worked, Field name rename didn’t.
Your other suggestion (defaulting to absolute expression path) is easily the most frustrating thing for me by far. This is constantly an issue over and over when I realise I need to add a step a few steps back and forget that the step just after that will default to the relative value and break the flow.
I have to find the node that has the issue, open up the expression, drag the data pill back in, save, go back to what I was doing before.
I can’t see any benefit to defaulting to relative paths - what does it possibly gain us?
But having relative paths in every step means any step change, always breaks the next step, 100% of the time.
All they need to do is just make {{ $json[‘XYZ’] }} automatically add the full pathing.
It’s terrible UI and DEV design to have a value that is dependent on something (e.g. X is dependent on Z), then adding Y in between changes or breaks the value of X.
Agreed, extremely frustrating. The other related issue is using the “item” method with pinned data, similar issue if you change anything in a previous step now the workflow wont run because “the item method can’t be used with pinned data” when it’s actually just broken because it was a relative path not an absolute path and running the previous step again “clears” the issue. Really gives me the mads those two issues
I’d like to add, where I see the greatest frustration is when I build a flow and multiple nodes use the short notation $json.somefield, referencing the previous node. Now I decide I need to add a step before a node and insert a new node. Now the inputs to the following node will be different so I have to change the notation in the last node to use the actual node name for the field I want from a previous step.
Came here to find a solution as I was expecting a missing setting in n8n. Especially for beginners who dont see the big picture upfront it is always neccessary to re-arrange nodes constantly.