I’m seeing an unexpected behavior in n8n’s data mapping / item linking and would like to understand if this is intended.
Minimal example
-
Node 1 – Edit Fields (normalize)
Output:[ { "event": { "message": "hello world" } } ] -
Node 2 – Edit Fields (enrich)
-
Field
event(object):
{{ $('Edit Fields - normalize').item.json.event }} -
Field
event.enrich(string):
this is a new text
Output of Node 2:
[ { "event": { "message": "hello world", "enrich": "this is a new text" } } ] -
-
Node 3 – any node with an expression
In Node 3 I can use:{{ $('Edit Fields - normalize').item.json.event.enrich }}and it successfully returns
"this is a new text", even thoughevent.enrichwas only created in Node 2.
Questions
-
Is it expected that an expression referencing Node 1 (
$('Edit Fields - normalize')) can access a field (event.enrich) that was only added in Node 2? -
How does this interact with the documented item linking behavior and
.itemresolution? -
From the engine’s point of view, what is the “true” data shape of Node 1 in this scenario – does it remain the original object without
enrich, and the expression engine is providing some merged view, or is there another mechanism at play?