Steps
Check the expression is really an expression
If the output shows the literal text
{{ $json.name }}, the field is in Fixed mode. In the workflow JSON an expression starts with=; without it, our Set node printed the braces as plain text for every item, with no error. Switch the field to Expression (or drag the field in from the input panel) and the value appears.Expect null, not an error, for missing fields
n8n expressions are forgiving:
{{ $json.missing }},{{ $json.user.email }}on an item with nouser, and even{{ $json.missing.toUpperCase() }}all gave null in our runs, and the workflow carried on. That is why a field "is empty" with no error. Fix the data, or give a default:{{ $json.user?.email ?? 'none' }}returnednonefor the item without a user. The same code inside a Code node is not forgiving:$json.user.emailstopped it withCannot read properties of undefined (reading 'email'). A few helpers do throw on a missing value:{{ $json.created.toDateTime() }}failed withtoDateTime can't be used on undefined value; write$json.created?.toDateTime().Fix node references: "Referenced node doesn't exist" and "No path back"
$('Name')must match the node name exactly. A typo, or a node you renamed after writing the expression (we referencedGet dataafter renaming itData), stopped the node withReferenced node doesn't exist. Referencing a node that exists but is not on the path to the current node (it never ran) gaveInvalid expression, with the internal messageNo path back to referenced node. If the node may be skipped (an IF branch, an optional step), guard it:{{ $('Other').isExecuted ? $('Other').first().json.x : 'skipped' }}ran fine in our test.Fix "Paired item data is unavailable"
$('Data').itemasks n8n for the item in Data that produced the current item. A Code node that returns new items breaks that link only when n8n can't guess it: 2 items in and 2 new items out still worked (Ada, Bob), and 2 in, 1 out quietly paired with the first item. But 2 in and 3 out failed withPaired item data for item from node 'Make' is unavailable. Ensure 'Make' is providing the required output.Two fixes that worked: returnpairedItem: {item: i}with each new item in the Code node (output Ada, Bob, Bob), or use$('Data').first(),.last()or.all()[$itemIndex]when you don't need the link.Fix types and syntax
A Set field of type Number fed the text
Adastopped with'v' expects a number but we got 'Ada' [item 0]; turn on Ignore Type Conversion Errors or change the field type. Watch numbers stored as text: withprice: "10",{{ $json.price + 2 }}gave102, while* 2gave 20 and{{ Number($json.price) + 2 }}gave 12. A missing bracket or a dangling+gave onlyinvalid syntax, with no line number, so count your brackets and quotes. Field names with spaces need brackets:{{ $json['first name'] }}. An object in a String field came out as JSON text,{"email":"ada@x.io"}.
What we tested, and what happened
On 19 October 2026 we ran 29 small workflows on self-hosted n8n 2.43.7 with n8n execute, Set node version 3.4 and Code node version 2. The test data was two items: Ada (with price: "10" and a user object) and Bob (with price: "7" and no user).
| Expression or setup | What happened |
|---|---|
{{ $json.missing }} | null for both items, no error. |
{{ $json.user.email }}, Bob has no user | Ada: ada@x.io, Bob: null, no error. |
{{ $json.user?.email ?? 'none' }} | Ada: ada@x.io, Bob: none. |
{{ $json.missing.toUpperCase() }} | null, no error. |
Same as Code node JS: $json.user.email | Error: Cannot read properties of undefined (reading 'email') [line 1]. |
{{ $json.created.toDateTime() }}, no created field | Error: toDateTime can't be used on undefined value. |
{{ $json.name }} without the = (Fixed mode) | Literal text {{ $json.name }}. |
{{ $('Nope').item.json.name }} | Error: Referenced node doesn't exist. |
| Reference to the old name after renaming a node | Same error. |
$('Other').item, Other not connected | Error: Invalid expression (No path back to referenced node). |
Same with an isExecuted guard | Ran, value skipped. |
Code node 2 in, 2 new out, then $('Data').item | Worked: Ada, Bob. |
Code node 2 in, 1 new out, then $('Data').item | Worked, silently paired with Ada. |
Code node 2 in, 3 new out, then $('Data').item | Error: Paired item data for item from node 'Make' is unavailable. |
Same, Code node returns pairedItem | Worked: Ada, Bob, Bob. |
Same, $('Data').first() instead of .item | Worked: Ada for all 3. |
$('Data').all()[$itemIndex], .first(), .last() | Worked. |
Legacy $node['Data'].json.name | Still worked. |
{{ $json.name + }}, {{ $json.name.toUpperCase( }} | Error: invalid syntax. |
Number field fed Ada | Error: 'v' expects a number but we got 'Ada' [item 0]. With Ignore Type Conversion Errors: Ada. |
price: "10": + 2, * 2, Number() + 2 | 102, 20, 12. |
| Object in a String field | {"email":"ada@x.io"}. |
{{ $json['first name'] }} | Ada. |
{{ $json.tags.split(',').length }}, Bob has no tags | Ada: 2, Bob: null, no error. |
{{ '2026-10-19'.toDateTime().plus(1,'days').toFormat('dd/MM/yyyy') }} | 20/10/2026. |
Quick checklist
- Seeing
{{ }}in the output? The field is in Fixed mode. - Value is empty but no error? A field is missing or misspelled (names are case-sensitive); add
?.and??defaults. Referenced node doesn't exist? Check the exact node name, especially after a rename.Paired itemerror after a Code node? ReturnpairedItem, or use.first()or.all()[$itemIndex].- Node on a branch that might not run? Guard with
$('Node').isExecuted. - Maths looks wrong? The number is text; wrap it in
Number().
Good to know
$env.Xfailing with access to env vars denied, or empty? See n8n access to env vars denied.- Structured Output Parser result missing? It sits under
$json.output: see n8n Structured Output Parser not working. - Reading the reply of the OpenAI node (Message a model)? It is at
{{ $json.output[0].content[0].text }}, not$json.text: see n8n OpenAI node not working. - An empty Chat ID expression in the Telegram node sends nothing at all: see n8n Telegram node not working.
- An expression that resolves to undefined in the Execution Data node saves an empty string with no error: n8n Execution Data node not saving.
- Expressions inside GraphQL variables must still produce valid JSON; use JSON.stringify, see n8n GraphQL node not working.
- Silent nulls hide bugs: because a missing field is not an error, an error workflow won't tell you. Add an IF or Filter on the fields that matter.
- Code node errors such as "Code doesn't return items properly" are covered in n8n Code node errors, and "Node hasn't been executed" after an IF in Merge and IF pitfalls.
- Pinned data: in the editor, an expression can look fine on pinned test data and fail on real data with a missing field. Test with a real execution before you publish.
What we didn't test
- The editor's inline expression preview (we built the workflows as JSON and ran them from the command line), Python in the Code node, and expressions inside credentials.
Expression gives null or stays as literal {{ }} text inside an Edit Fields (Set) node? See n8n Edit Fields (Set) node not working (29 real runs).
Start from a working agent
FAQ
Why does my n8n expression return null or an empty value?
The field is missing, misspelled or nested differently on that item. In our n8n 2.43.7 tests, $json.missing, $json.user.email with no user and even $json.missing.toUpperCase() all returned null without an error. Add a default with ?? or check the input panel for the exact field name.
What does "Referenced node doesn't exist" mean in n8n?
The name inside $('...') doesn't match any node in the workflow, usually because of a typo or because the node was renamed after the expression was written. Fix the name and the error goes away.
How do I fix "Paired item data is unavailable" in n8n?
A node before it, often a Code node, created new items without saying which input item each came from. Return pairedItem: {item: i} with each new item, or use $('Node').first(), .last() or .all()[$itemIndex] instead of .item.
Why does n8n show {{ $json.field }} as text instead of the value?
The field is set to Fixed instead of Expression. Switch it to Expression; in the workflow JSON, an expression value starts with an equals sign.
Why does n8n add 10 + 2 as 102?
The value is stored as text, so + joins the two. Use Number($json.price) + 2, or set the field type to Number in an earlier Set node.
Related guides
- n8n Edit Fields (Set) node not working: dropped fields, type errors and invalid JSON, 29 runs
- n8n Switch node not working: missing items, wrong output and type errors, 30 runs
- n8n Supabase node errors: credentials, RLS and filter fixes, 41 runs
- n8n Extract From File (CSV) not working: delimiter, BOM, encoding and errors, 32 runs
- n8n Data Table node not working: unknown column, types, upsert, 78 runs
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes