n8n Automation Cheatsheet: Core Nodes, Expressions, Credentials and Error Workflows
n8n quick reference: the core nodes that appear in every workflow, expression syntax with {{ }}, how data and credentials flow, and the error-handling setup that keeps automations alive.
1. Core Nodes You Will Use in Every Workflow
Workflows are triggers plus transformations plus actions. These twelve nodes cover most real automations; learn them first.
| Node | Role in the workflow |
|---|---|
Manual Trigger | Start on click β for testing and one-off runs |
Schedule Trigger | Run on a cron schedule (every hour, weekdays at 9:00β¦) |
Webhook | Start when an HTTP request hits your unique URL; can respond synchronously |
HTTP Request | Call any API: method, URL, headers, body, authentication |
Code | Transform items with JavaScript (Run Once for All Items is the common mode) |
Edit Fields (Set) | Build or reshape the JSON each item carries |
IF | Branch on a condition: true path and false path |
Switch | Route items to one of several outputs by value |
Split Out | Turn one item with an array field into many items |
Merge | Combine two branches back into one stream of items |
Wait | Pause execution (resume after a time or a webhook call) |
2. Expressions: {{ }} Is Where Data Moves
Any field in any node can hold an expression between double curly braces. Expressions read the JSON of incoming items and the output of earlier nodes by name.
// Data from the current item
{{ $json.email }} // field of the incoming item
{{ $json.body.customer.name }} // nested field (webhook payloads sit under body)
// Data from an earlier node, by its exact name
{{ $('HTTP Request').item.json.id }} // paired item
{{ $('HTTP Request').first().json.token }} // first output item
{{ $('HTTP Request').all() }} // every output item
// Dates and environment (Luxon under the hood)
{{ $now.toISO() }} // current timestamp
{{ $now.minus({ days: 7 }).toFormat('yyyy-MM-dd') }}
{{ $env.API_BASE_URL }} // environment variable
// Inside the Code node the same data is plain JavaScript
return items.map(item => ({ json: { ...item.json, seen: true } }));
3. Data Flow and Credentials
Two ideas prevent most beginner pain: items stay linked across nodes (paired items), and secrets live in credentials that nodes reference β never pasted into fields.
- Items are the unit of data. Most nodes run once per item; an execution with 50 incoming items runs the next node 50 times.
- Paired items keep the chain traceable. Expressions pointing at earlier nodes follow the pairing to the matching item β keep the default unless you deliberately switch to .first() or .all().
- Create credentials once, reuse everywhere. Settings β Credentials stores API keys and OAuth connections encrypted; nodes just select the credential by name.
- OAuth2 is the default for Google, Slack and friends: create the credential, click Connect, approve in the browser β tokens refresh automatically.
- Generic credentials cover the rest: Header Auth (API key in a header), Basic Auth and Bearer-style tokens for services without a dedicated node.
- Pin data while building. Pinning a node output freezes sample data so downstream nodes can be edited without re-running upstream API calls.
4. Error Workflows: Automations That Survive
Every production workflow needs a failure path: configure it once, and add retries where the flaky call lives.
- Workflow Settings β Error Workflow: point the workflow at a dedicated error workflow. It starts with an Error Trigger node and receives the failed workflow name, node and error message β send it to Slack or email.
- Node Settings β Retry On Fail: retry up to a set number of times with a wait between tries; built for rate limits and flaky APIs.
- Node Settings β On Error β Continue: let the execution proceed and handle the failure in the next node by checking
$json.errorin an IF node. - Stop And Error node: raise a deliberate, readable failure when data is invalid instead of letting a later node crash cryptically.
- Executions view is your logbook: every run (success or error) keeps its full item data for inspection and re-running from the failed node.
π Associated Learning Path & Monetization Blueprints
n8n AI Agents and Automation Workflows
Build complete AI-agent automations on top of these nodes, expressions and error patterns.
Read Full Guide βAutonomous B2B Lead Enrichment
Sell n8n automations that enrich and route B2B leads around the clock.
Read Blueprint βNeed another cheat sheet?
We add new reference guides every week based on community requests.
Request a Cheatsheet β