Expressions, Code node or visual nodes?
Use the smallest tool that does the job: an expression for one value, a node for common jobs, code for the rest.
Read on 14 November 2026. Products change quickly: check the sources.
The documentation's table
n8n gives several ways to work with data, and its page compares them:
| Approach | Use when you need to | Example from the docs | Available on |
|---|---|---|---|
| Expressions | Set a single parameter value using existing data | Pull {{ $json.city }}, format dates, simple math | Cloud and self-hosted |
| Code node | Write full JavaScript or Python for complex transformations | Restructure data, loop through items, use external libraries | Cloud and self-hosted |
| AI Transform node | Generate transformation code from natural language | Group by user and sum totals, categorize by sentiment | Cloud only |
| Other data transformation nodes | Common operations through a visual interface | Aggregate items, split arrays, sort data, remove duplicates | Cloud and self-hosted |
Expressions
An expression is a small piece of JavaScript-like code that you put directly into a node parameter using {{ ... }}. It can use data from previous nodes, workflow metadata or environment variables to set the value dynamically.
A simple rule
- One field to fill from existing data: an expression.
- A common job such as sorting or removing duplicates: a data node.
- Anything that needs real logic, loops over items or libraries: the Code node.
Because every approach works on items (see the page on how data moves), your first step is always to look at what the previous node outputs.
Is the AI Transform node available everywhere?
According to the table, it is Cloud only.
Which is faster to learn?
The visual nodes need the least code. We have not measured speed, and the documentation does not compare it.
Sources
- n8n docs: Expressions versus data nodes (docs.n8n.io/code/expressions/ and the Work with data section)
Read on 14 November 2026.
This is an independent guide. It is not connected with n8n. Products change quickly: statements were read on 14 November 2026 from the n8n documentation pages named under Sources, and limits, defaults and version numbers may have changed since. We do not give prices or compare products.