Individual skill
n8n-expressions-official
Use when writing or reviewing n8n expressions (`{{...}}` syntax), `$json` / `$node` references, Luxon date code, or expression errors. Triggers on `{{}}`, `$json`, `$node`, `$input`, `DateTime`, `Luxon`, "expression error", "evaluating", "format date", "transform field", or any node-parameter assignment.
skills/n8n-expressions-official/SKILL.md
Source commit 27b6b9f429ac0be90cae764512dbc579d7107e95
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Local scripts
- Last checked
- Nov 10, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 600
- Repository last updated
- Nov 10, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytesSKILL.mdcore · 21,281 bytes
Read excerpt
# n8n Expressions
n8n's expression language is JavaScript embedded in `{{...}}` blocks. They run synchronously, on a single item at a time (`$json`), with access to upstream nodes (`$('Name')`), Luxon for dates, and most of native JS.
## Non-negotiable
**Reference data by node name, not `$json`.** Use `$('Node Name').item.json.field` (or `.first().json.field`). `$json` works but breaks when any node clears item context (Aggregate, Code with Run for All, branching merges) or a refactor adds an intermediate. Failures are silent, and downstream gets the wrong data with no error. Node-name references are stable.
## Strong defaults
- **No Set nodes whose only purpose is to feed a single downstream field.** Inline the expression at the consumer. Set earns its place when 2+ consumers read the same derived value, the derivation is non-trivial, or the Set is a sub-workflow's final return-shaper. See "The Set-node antipattern" below.
- **Luxon for dates, not the DateTime node.** Date math, formatting, and parsing all work in expressions: `{{ DateTime.now().minus({ days: 7 }).toISO() }}`. The DateTime node is more visible on the canvas for beginner human users, but avoid it unless the user specifically asks for it.
- **Expressions over extra nodes generally.** Build the email body in the email node's body field, and compute the URL in the HTTP Request's URL field. Reach for an extra node when the transform is reused or the *primary purpose* of a section.
- **Multi-line expressions are indented and commented.** When an expression spans more than one line, format it like real code. Most n8n users are not coders, so explain the code with concise inline comments