Fix “Referenced node is unexecuted” in n8n
What this error means
An expression like $('Get contact').item.json.id reads the output of another node. If that node didn't run in this execution, there's no output to read. n8n stops and tells you which node it expected.
Common causes
- The referenced node is on another branch of an IF or Switch that wasn't taken for this item.
- The referenced node is connected after the current node, not before it.
- You clicked “Execute step” on a single node while testing, so earlier nodes didn't run.
- The node was disabled or skipped, or it produced no items so later nodes never ran.
How to fix it
- Follow the connections backwards from the failing node: the referenced node must be on the path that leads to it.
- If the data comes from a branch that may not run, rejoin the branches with a Merge node and read the value from the merged item.
- While testing, run the whole workflow (or pin data on the earlier nodes) instead of executing one node on its own.
- If the earlier node can return zero items, enable Always Output Data in its settings so the flow continues.
❌ Breaks
// Current node is on the 'false' branch of an IF
{{ $('Create Deal').item.json.id }}✅ Works
// Read from a node that runs on every path
{{ $('Find Contact').item.json.id }}💡 Pro tip: Name nodes clearly (“Find Contact”, not “HTTP Request3”). It makes every $('…') reference self-explanatory and these errors much easier to trace.