What n8n Is And Why It Uses Nodes
n8n is a workflow builder made of nodes. Here is what a node is, how items and expressions actually move data between them, and how to debug when they do not.
n8n in one sentence
n8n is a workflow automation tool where you connect small blocks called nodes on a canvas to move data between apps and run logic, including AI steps. Each node does one job: fetch a record, transform data, call an app, or ask a model a question. You wire the output of one node into the input of the next, and data flows left to right along those connections. Everything you build is also just JSON under the hood, which means workflows can be exported, versioned, shared, and imported like code.
Why the node model matters
The node model forces every step to be explicit and visible. Unlike a chat prompt where everything happens invisibly, an n8n workflow shows exactly what data enters each step and what leaves it. When something breaks, you open the failing node, inspect the input it received, and see precisely where the logic went wrong. This is a real advantage for operators: debugging becomes reading, not guessing.
The three node families you will use constantly
| Family | What it does | Examples |
|---|---|---|
| Trigger nodes | Start a run when an event happens | Chat Trigger, Webhook, Schedule Trigger, Gmail Trigger |
| Regular nodes | Fetch, transform, or send data | HTTP Request, Google Sheets, Slack, IF, Set (Edit Fields) |
| Cluster nodes | A root node plus sub-nodes, used for AI | AI Agent plus Chat Model, Memory, and Tool sub-nodes |
Cluster nodes are the AI-specific pattern: a root node such as the AI Agent has connection points along its bottom edge where you attach a model, a memory store, and tools. You will meet these in the next lesson.
How data actually moves: items and JSON
Data in n8n travels as a list of items, and each item is a JSON object. A node runs once per item by default, so if a trigger delivers three records, the next node processes all three. This is the single most useful thing a beginner can internalize, because most confusion comes from not knowing what shape the data is in. After any execution, click a node and n8n shows the exact input and output. A typical item looks like this:
[
{
"json": {
"name": "Priya Shah",
"email": "priya@example.com",
"plan": "pro",
"signup_date": "2026-06-28"
}
}
]
Expressions: reaching into the JSON
To use a value from a previous node inside a field, you write an expression wrapped in double curly braces. Expressions are how nodes talk to each other, and you will write dozens of them in every real workflow:
{{ $json.email }} // field from the current item
{{ $json.customer.address.city }} // nested field
{{ $('Webhook').item.json.body.order_id }} // field from a specific earlier node
{{ $json.name.toUpperCase() }} // JavaScript methods work inside expressions
{{ $now.format('yyyy-MM-dd') }} // built-in date helper
If a field shows up empty downstream, the expression is almost always pointing at a path that does not exist. Open the source node's output, find the real path, and fix the expression. Never guess at field names.
Workflows are portable JSON
Select any nodes on the canvas, copy them, and paste into a text editor: you get importable JSON. This is why templates work, and why this course shows node configs as JSON. A minimal two-node workflow fragment looks like this:
{
"nodes": [
{
"name": "Every Morning",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": { "interval": [{ "field": "cronExpression", "expression": "0 8 * * 1-5" }] }
}
},
{
"name": "Fetch Open Tickets",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.example.com/tickets?status=open",
"authentication": "genericCredentialType"
}
}
],
"connections": {
"Every Morning": { "main": [[{ "node": "Fetch Open Tickets", "type": "main", "index": 0 }]] }
}
}
You can paste fragments like this directly onto the n8n canvas. When you see workflow JSON later in this course, that is exactly what it is for.
Executions, credentials, and activation
Three more concepts round out the mental model. First, executions: every run of a workflow is recorded, and the Executions list lets you open any past run and inspect what every node received and produced. This is your flight recorder, and you will live in it while debugging. Second, credentials: connections to external services (an OpenAI key, a Google account, a Slack app) are stored once as named credentials, encrypted, and referenced by nodes, so secrets never sit inside node parameters. Third, activation: a workflow you are editing only runs when you click execute. To make triggers listen continuously in production, you toggle the workflow to Active. A finished workflow that was never activated is the most common "why is nothing happening" ticket in every n8n team.
How to work effectively
- Build one node at a time and execute after each addition, so the last change is always the prime suspect for new behavior.
- Open a node's output panel and read the actual JSON before wiring the next step.
- Rename nodes to describe their job ("Fetch Open Tickets", not "HTTP Request1") so a twenty-node canvas stays readable a month later.
- Pin sample data on a node while building, so you can iterate downstream logic without re-firing the trigger every time.
The item model, in the two cases that confuse everyone
"A node runs once per item" is the sentence that explains most n8n surprises, but it only becomes useful once you have seen the two places it bites.
Case one: one item in, many messages out. A Google Sheets node reading a 200-row sheet produces 200 items. Wire a Slack node after it and you get 200 Slack messages, because each item is a separate run. That is correct behaviour and it is almost never what you wanted. The fix is to collapse the list into a single item before the Slack node, which is what an aggregate step is for - one item in, one message out, with all 200 rows inside it.
Case two: many items in, one item out, and the rest silently dropped. Some nodes summarise rather than map. If you are not sure which kind you are looking at, do not read the docs - execute it and count. The item counter at the top of the output panel is the ground truth, and comparing input count to output count after every node is a habit that saves entire debugging afternoons.
The general rule underneath both: after every node, ask how many items came out. A workflow that behaves strangely almost always has one node where the count changed and you did not notice.
Reading the four errors you will actually hit
n8n error messages are better than most, but the first four are worth translating in advance because each has a fixed cause.
| What you see | What it means | Where to fix it |
|---|---|---|
| A field renders empty, no error | The expression path does not exist in this item | Source node's output panel - read the real path, do not guess |
| "Cannot read properties of undefined" | You reached through a missing parent, e.g. $json.customer.city when customer is absent | Guard it: {{ $json.customer?.city }} and decide what should happen when it is missing |
| 401 or 403 from an app node | Credential missing, expired, or lacking a scope | The credential itself, not the node - reconnect and re-test the credential |
| Workflow runs in the editor, never in production | Not activated, or the trigger is an editor-only test trigger | The Active toggle, and check which trigger you actually used |
Note that only one of those four is an error at all. The silent-empty-field case is the most common failure in n8n and it never raises anything - which is precisely why the read-the-output-panel habit matters more here than the error-handling habit.
Expressions: the four you will write constantly
Beyond the basics above, four patterns cover most real work. They are worth learning as shapes rather than looking up each time.
// 1. Default when a field may be missing - stops empty strings
// reaching an app that rejects them
{{ $json.company || 'Unknown' }}
// 2. Reach back to a specific earlier node by name. Essential once a
// branch has changed the item shape and $json no longer has the field.
{{ $('Fetch Open Tickets').item.json.ticket_id }}
// 3. Conditionals, for building a message rather than branching the flow
{{ $json.plan === 'pro' ? 'Priority support' : 'Standard support' }}
// 4. Dates - format for humans, subtract for windows
{{ $now.format('yyyy-MM-dd') }}
{{ $now.minus({ days: 7 }).toISO() }}
Two habits keep expressions from becoming a mess. First, if an expression is long enough to need scrolling, move the logic into a Set node and give the result a name, so the next person reads {{ $json.support_tier }} instead of a nested ternary. Second, prefer the named-node form in pattern 2 over relying on $json whenever the value comes from further back than the immediately preceding node - it survives someone inserting a node in the middle, which $json does not.
Where n8n sits against the alternatives
It is worth being honest about when n8n is not the answer, because picking the wrong tool costs far more than any node-level mistake.
- Against Zapier and Make. Those are faster for a simple two-app connection with no logic, and they require no hosting decision at all. n8n earns its place when the workflow has real branching, when you want the logic under version control, or when the data cannot leave your infrastructure. If the job is genuinely "when a form is submitted, add a row", n8n is not obviously better - see the platform comparisons for the longer version.
- Against writing code. Code wins on testing, on complex state, and on anything a team of engineers will maintain for years. n8n wins on visibility for non-engineers and on the sheer number of pre-built app integrations you do not have to write or maintain.
- Self-hosted against cloud. Self-hosting removes per-execution pricing and keeps data on your own machines, and it hands you an upgrade path, a backup policy, and an uptime problem. That is a real trade, not a free win. Decide it on who will be on call, not on the licence.
The version of this question that matters commercially is simpler: whichever tool you pick, the workflow has to be readable by whoever inherits it. Node naming and the item-count discipline above are what make an n8n canvas inheritable, and they are the difference between an automation that survives your holiday and one that does not.
Setup: get n8n running locally in five minutes
Everything in this lesson is easier to hold once you have a canvas open. You do not need a paid account or a server to follow along - one command runs a full instance on your own machine. Version numbers here were last checked against docs.n8n.io on 17 November 2026; check the docs before assuming they still hold.
Prerequisite. Node.js. n8n's own requirement is a version between 20.19 and 24.x inclusive, so check yours before anything else - a Node version outside that band is the cause of most "it will not start" reports, and the error it produces is rarely about Node.
node --version # must be >= 20.19 and < 25
# Option A - try it without installing anything. Downloads on first run.
npx n8n
# Option B - install it globally and keep it
npm install n8n -g
n8n start
Either way, open http://localhost:5678 and you have a canvas. When we last checked the n8n release notes (17 November 2026) the current stable release was 2.48.4, on the 2.x line; you can pin an exact one with npm install -g n8n@<version> and update later with npm update -g n8n. Pinning matters more than it sounds: node parameters do occasionally change between releases, and a workflow exported from a newer version can fail to import into an older one.
Two things to know about a local instance before you build anything real on it. Data lives in a local database file under your home directory, so deleting it deletes your workflows - export anything you care about. And a local instance is not reachable from the internet, which means webhook triggers from external services will not arrive until you either use the tunnel option for testing or host it somewhere with a public URL. That single fact accounts for a large share of "my webhook never fires" confusion on day one.
A complete workflow you can paste onto the canvas
The fragment earlier showed the JSON shape. Here is a whole working workflow instead - trigger, fetch, branch, shape, notify - so you can import it and then break it deliberately, which is how the item model actually gets learned. Copy this block, click anywhere on an n8n canvas, and paste.
{
"name": "Daily open-ticket digest",
"nodes": [
{
"parameters": {
"rule": { "interval": [ { "field": "cronExpression", "expression": "0 8 * * 1-5" } ] }
},
"name": "Every Weekday 8am",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [ 200, 300 ]
},
{
"parameters": {
"url": "https://jsonplaceholder.typicode.com/todos",
"options": {}
},
"name": "Fetch Tickets",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [ 420, 300 ]
},
{
"parameters": {
"conditions": {
"boolean": [ { "value1": "={{ $json.completed }}", "value2": false } ]
}
},
"name": "Only Open Ones",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [ 640, 300 ]
},
{
"parameters": {
"assignments": {
"assignments": [
{ "name": "line", "type": "string",
"value": "={{ '#' + $json.id + ' - ' + $json.title }}" }
]
},
"options": {}
},
"name": "Build Line",
"type": "n8n-nodes-base.set",
"typeVersion": 3,
"position": [ 860, 220 ]
}
],
"connections": {
"Every Weekday 8am": { "main": [ [ { "node": "Fetch Tickets", "type": "main", "index": 0 } ] ] },
"Fetch Tickets": { "main": [ [ { "node": "Only Open Ones", "type": "main", "index": 0 } ] ] },
"Only Open Ones": { "main": [ [ { "node": "Build Line", "type": "main", "index": 0 } ], [] ] }
}
}
The public test API it calls needs no credential, so this runs for anyone. Click Execute Workflow and then read the item counter at the top of each node's output panel in order. That sequence of numbers is the lesson: the trigger emits 1 item, Fetch Tickets emits 200, Only Open Ones emits fewer on its first output and the rest on its second, and Build Line emits one item per surviving ticket. Nothing here is guesswork - the counter tells you at every step.
Note the two-element array on the IF node's connections. An IF node has two outputs, true and false, and the empty second array means anything failing the condition goes nowhere. That is a deliberate choice and it should always be deliberate: silently discarding the false branch is fine for a digest and catastrophic for anything that moves money, and the JSON is where you can see which one you chose.
The debugging loop: pin, break, replay
Now break it on purpose, because the repair loop is the actual skill. Three exercises, each one producing a different class of failure.
- Break an expression path. In Build Line, change
$json.titleto$json.subject. Execute. The output is not an error - it is 200 lines reading "#1 - undefined". This is the silent failure from the error table, and the only thing that catches it is opening the output panel and looking. - Break a nested path. Change it to
$json.customer.name. Now you get "Cannot read properties of undefined", because you reached through a parent that does not exist. Fix it with optional chaining -{{ $json.customer?.name }}- and notice you are now back in case 1, silently producing "undefined". Guarding the access is not the same as handling the absence, and the fix that actually holds is{{ $json.customer?.name || 'Unknown' }}. - Break the URL. Point Fetch Tickets at a path that does not exist. The node fails loudly and the run stops. This is the easy class of failure, and it is worth seeing precisely so you can feel how different it is from the first two.
While iterating, do not keep re-firing the trigger. Pin the data on Fetch Tickets - execute once, then pin its output - and every subsequent execution feeds downstream nodes from the pinned copy instead of hitting the API again. This turns a five-second loop into an instant one, keeps you off someone's rate limit, and makes the input identical every run, which is the only way to know whether a change helped. Unpin before you activate anything, because pinned data in production means the workflow processes yesterday's records forever.
When something already ran and went wrong, the Executions list is the flight recorder. Open the failed run, click through the nodes, and read what each one actually received - not what you assume it received. The two questions that resolve most incidents are the same every time: which node changed the item count, and which field first became undefined. Answer those and the fix is usually one expression.
Before you build anything real: five conventions
These cost nothing on day one and are painful to retrofit at node forty. Adopt them on your first workflow, not your fifth.
- Name every node for its job, immediately. Rename as you add, not later. "Fetch Open Tickets" survives; "HTTP Request3" means that in three months the only way to know what a node does is to open it. This also matters because expressions reference nodes by name - rename a node after wiring an expression to it and the expression breaks, which is a strong argument for naming at creation time.
- Create credentials before the node that needs them, and test them there. A credential tested on its own page either works or does not. A credential tested for the first time inside a twelve-node workflow produces an error that looks like a workflow bug.
- Add a Set node immediately after any external fetch. Its job is to pick out and rename the handful of fields you actually use. Everything downstream then depends on your names rather than the vendor's, so when the API changes shape you fix one node instead of nine expressions.
- Export the workflow JSON into version control at each milestone. Select all, copy, paste into a file, commit. The editor has no meaningful history of its own, and "it worked yesterday" is not recoverable without this.
- Decide the failure behaviour per node deliberately. Every node can either stop the run or continue past an error. The default is to stop, which is right for anything whose output later steps depend on, and wrong for the notification at the end - a Slack message failing should not lose the work that produced it. Make that a choice rather than an accident.
The third one is the highest-leverage and the least obvious. A workflow whose expressions all read {{ $json.ticket_id }} and {{ $json.customer_email }} - your names, set once - is a workflow a colleague can read. One whose expressions reach into {{ $json.data.attributes.relationships.customer.id }} at nine different points is one nobody will touch, including you.
Common mistakes
- Building a large workflow before executing any of it, then facing a dozen possible failure points at once.
- Guessing field names in expressions instead of reading the real node output.
- Leaving nodes with default names, so the canvas becomes unreadable as it grows.
- Forgetting that nodes run once per item, then wondering why a Slack node sent fifty messages.
What you should be able to do now
- Explain what a node is and name the three node families.
- Open any node after a run and read its input and output JSON.
- Write a {{ $json.field }} expression that pulls a value from a previous node.
- Copy a workflow fragment as JSON and paste it back onto the canvas.
- Explain the difference between executing in the editor and activating a workflow.
Where this goes next
This lesson and The AI Agent node explained are the free part of the course. They cover the mental model - nodes, items, expressions, executions - and the one AI node everything else hangs off. That is enough to build and debug a straightforward workflow, and you should do exactly that before going further.
The paid lessons build the agent properly. Attaching tools and writing tool descriptions the agent selects correctly, memory and what actually gets fed back each turn, structured output so downstream nodes get clean JSON instead of prose, retries and error branches for when an API is down at 3am, calling one workflow from another so you can compose rather than build one giant canvas, and the operational side - credentials, environments, and what to check before you hand a workflow to somebody else. Each lesson ships importable workflow JSON.
If you want the workflow to exist rather than to learn n8n, that is what we do - see AI automation services, or book the free automation audit and we will map which of your processes is worth automating first. For background reading, the workflow automation and webhook glossary entries are the short versions of two things this lesson assumed.
The email box below sends the free lessons plus the workflow JSON from them, importable straight onto your canvas. That costs nothing and saves you retyping node configs from a web page.
Key takeaways
What to remember from this lesson
- A node does one job, and the canvas makes every step's input and output visible - debugging becomes reading, not guessing.
- Three node families: triggers start a run, regular nodes fetch/transform/send, cluster nodes are a root plus sub-nodes and are how AI works in n8n.
- Data travels as a list of items, each a JSON object, and a node runs once per item by default. Most beginner confusion traces back to this.
- Expressions like {{ $json.email }} are how nodes read each other. Read the real output panel to find the path - never guess field names.
- Executing in the editor is not the same as activating. An un-activated workflow is the most common 'why is nothing happening' ticket.
Try it yourself
Run a node over a list of items
This is the single idea that trips up every n8n beginner: a node receives a LIST of items and runs once per item. Below is the shape n8n actually passes between nodes. Write the transform a Set node would do, and watch it run over every item rather than just the first.
Check yourself
The three things beginners get wrong
A node receives 50 items. By default, how many times does it run?
You wrote {{ $json.Email }} and get nothing, though the data clearly has an email. What is the most likely cause?
Your workflow runs perfectly when you click Execute, but nothing happens when the webhook fires in production. Why?
Answer every question to mark.
Exercise
Build a two-node workflow and read its JSON out loud
- 1In a new n8n workflow, add a Schedule Trigger and an HTTP Request node pointed at any public JSON endpoint (https://api.github.com/repos/n8n-io/n8n works with no credentials).
- 2Rename both nodes to describe their job, the way the lesson names 'Fetch Open Tickets' rather than 'HTTP Request1'.
- 3Execute the workflow in the editor, then click the HTTP Request node and read its actual output JSON. Write down the exact path to two fields you can see.
- 4Add a Set (Edit Fields) node after it and populate one field with an expression using one of those two paths, e.g. {{ $json.stargazers_count }}. Execute again and confirm the value is not empty.
- 5Deliberately break it: change the expression to a path that does not exist, execute, and observe the empty field. Then fix it by re-reading the source node's output.
- 6Select all three nodes, copy them, and paste into a text editor. Find the `connections` object and confirm it names your renamed nodes.
You are done when Your Set node outputs a real, non-empty value taken from the HTTP response, you have seen the same field go empty when the expression path was wrong, and you can point at the `connections` block in the copied JSON and say which node feeds which.
Companion files
Workflow JSON from this lesson
The node fragments shown above as importable JSON - paste them straight onto your canvas instead of retyping the schedule and HTTP configs.
The free-preview pack includes 4 files of runnable code and config for What n8n Is And Why It Uses Nodes, plus the other free lessons of this course. No email needed.
Free preview pack - 8 KB zipCheck yourself
Answer before you reveal
A trigger delivers 50 records and the next node is a Slack node. What happens, and why?Show answer
It sends 50 Slack messages. A node runs once per item by default, and the trigger produced 50 items.
A downstream field renders empty. What is the first thing to check, and where?Show answer
The expression path. Open the source node's output panel from the last execution and read the real JSON structure - an empty field almost always means the expression points at a path that does not exist.
Your workflow works perfectly when you click execute, but nothing happens in production. Why?Show answer
It was never toggled Active. Executing runs it once in the editor; only activation makes the trigger listen continuously.
