Expressions are how each node uses the data of the current item instead of fixed values.
When you configure a node you usually want values from earlier data: send the email to this item's address, not to a fixed one. n8n does this with expressions: small formulas inside double curly braces, {{ ... }}, that n8n replaces with a real value when the node runs.
The easy way: open a node, find the field in the INPUT panel and drag it into a parameter. n8n writes the expression for you, for example {{ $json.email }}. Read it as "the email field of the current item". $json always means the current item's data.
Every parameter has a Fixed / Expression switch. Fixed means the text is used exactly as typed. Expression means anything inside {{ }} is calculated. Below an expression field, n8n shows a live preview of the result for the current item, which is the fastest way to check you got it right.
You can mix text and expressions:
Hello {{ $json.name }}, your order {{ $json.orderId }} has shipped.- Nested data uses dots:
{{ $json.address.city }}. - Small changes work inline:
{{ $json.name.toUpperCase() }}.
Because most nodes run once per item, the same expression gives each item its own value.
Expressions are written in a JavaScript-like style (JavaScript is the programming language of web pages), but you only need the simple forms above to start. The next lessons add data nodes and more expression tools.
Example
To: {{ $json.email }}
Subject: Your order {{ $json.orderId }} has shipped
Body: Hi {{ $json.name }}, it is on its way to {{ $json.address.city }}.Remember
- Expressions in {{ }} are calculated for each item
- $json means the current item's data; dots reach nested fields
- Switch parameters between Fixed and Expression, and check the preview
Watch out for
- Typing {{ $json.email }} into a field left in Fixed mode, which sends the literal text.