Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Expressions

Direct answer

n8n expressions are JavaScript snippets in {{ }} that read data from previous nodes, such as {{ $json.email }} or {{ $('HTTP Request').item.json.id }}, to build dynamic values.

When to use this

Use this when using expressions in n8n nodes.

First 30 seconds

1. Expressions access item data and context ({{ }} JavaScript-like).

2. Handle missing fields.

3. Keep complex logic in Code nodes.

4. Test with pinned data.

5. Avoid secrets in expressions.

Operational verification

item data → expression → value

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
n8n workflow automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformn8n workflow automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when using expressions in n8n nodes.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Expressions that break when a field is missing.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Expressions are JavaScript in {{ }}.
  • Use $json and $('Node') to read data.
  • Test them in the editor.
Key checks
  • {{ $json.field }} / {{ $('Node').item.json.x }} — expression examples
  • Expression preview in editor — testing
  • Null-safe access — robustness
ReferenceWhy it matters1 section · depth on demand

What it is

Expressions ({{ $json.field }}) read data from previous nodes and transform it inline.

ReferenceImportant terms & boundaries2 sections · depth on demand

How it works

n8n expressions run JavaScript inside {{ }} with helpers such as $json (current item), $('Node name') (another node's output), $now and $env. They are evaluated per item, so a workflow processing 100 items runs the expression 100 times.

Example

{{ $json.hostname.toLowerCase() }}
{{ $('HTTP Request').item.json.id }}
{{ $now.toISO() }}

Expressions are JavaScript; use ?. and defaults for optional fields.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docn8n workflow automation current

Authoritative/upstream documentation reviewed for bounded claims in n8n > Expressions. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.n8n.io/ · confidence 94%
Confirmation

Confirm action

Continue?