Skip to content
Reviewed by Bipeen Sinha Oct 06, 2026

Home › Guides › n8n Tutorial

Tool Deep Dive · 2026

n8n Tutorial 2026: How Executions Are Billed, Your First AI Agent and When Not to Use It

This n8n tutorial covers the parts that decide whether your automation survives: n8n is a fair-code workflow tool that chains triggers, app nodes and AI agents, and bills Cloud usage by workflow run, not by node. One run of a 50-node workflow costs exactly one execution. Self-hosting the Community edition carries no licence fee.

6 October 20269 min readBy the 360 Digital Transformation Editorial Team
Key takeaways
  • Billing counts runs, not work. Two nodes or two hundred, each trigger burns one execution.
  • A 15-minute schedule costs 2,880 executions a month, exceeding the entry Cloud plan's 2,500 on its own.
  • Self-hosting is free in licence terms, not in hours. You own Postgres, Redis, backups and the encryption key.
  • n8n 2.0 moved Code nodes onto task runners, breaking workflows that read environment variables or shell out.
  • The licence stops at resale. Per-client instances are fine; one shared instance your customers log into is not.

Your automation works on Tuesday. On Friday it stops, every workflow at once, because the Cloud plan hit its execution cap and there is no overage and no grace period. Nobody touched the workflow. Someone tightened a schedule from hourly to every five minutes three weeks ago, and the arithmetic caught up. Most n8n tutorials teach you to drag nodes onto a canvas. This one covers what decides whether your build still runs in six months.

Three numbers worth memorising first

Cost, currency and credibility.

2,500
Executions in n8n's entry Cloud plan each month, as listed in October 2026
2.42.3
Latest n8n release on the official GitHub repository, published 5 October 2026
200 hrs
Monthly staff time Delivery Hero reports recovering from one workflow

Release read from the n8n GitHub releases API; other figures checked 6 October 2026.

What n8n Is, and the One Design Decision That Explains It

n8n is a workflow engine you drive from a visual canvas. A trigger starts a run, each node receives JSON items from the node before it, and branches and error paths are connections you draw. Four node types carry most work: triggers (Webhook, Schedule, app events), app nodes (Slack, Postgres, HTTP Request), logic nodes (IF, Switch, Split In Batches) and the Code node, for when the canvas runs out of patience.

The decision that explains the rest: n8n passes arrays of items between nodes, and most nodes run once per item. Fetch 500 rows from Postgres and the HTTP Request node downstream fires 500 times. That is why a workflow feels fast on three test rows and then hammers a vendor API at two in the afternoon. Learn Split In Batches early.

One scenario runs through this guide: you own "automation" at a 40-person logistics firm in Pune, with two people in ops, one analyst and no platform team.

n8n at a glance

What you need in the first hour.

5678
Default editor port
20.19 to 24.x
Supported Node.js range
1 run = 1 execution
How Cloud counts usage
No licence fee
Self-hosted Community edition

From n8n's installation documentation, checked 6 October 2026.

n8n Tutorial: Get It Running Locally in Ten Minutes

Install it before you read another paragraph about it. Docker pins the Node.js version and keeps your data in one named volume.

docker volume create n8n_data

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -e GENERIC_TIMEZONE="Asia/Kolkata" \
  -e TZ="Asia/Kolkata" \
  -e N8N_RUNNERS_ENABLED=true \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

Open http://localhost:5678 and you have an editor. That volume holds an SQLite database, your webhook URL and the encryption key protecting every saved credential, so it is the one thing you must back up. GENERIC_TIMEZONE set to Asia/Kolkata is what makes a Schedule node fire at 9am IST rather than 9am UTC, which settles the "why did the report go out at 2:30pm" ticket.

The 2.0 change that breaks working workflows

From 2.0, Code node executions run on task runners, which changes what the Code node may touch. Code nodes reading process environment variables, plus the Execute Command and Local File Trigger nodes, fail under the new defaults until you grant that access in the runner configuration. Python in the Code node now needs runners in external mode, meaning the separate runners image. Read the breaking changes page before you pull the new tag.

If docker run still feels like copying magic strings, start with our Docker tutorial for beginners. Also read: our MCP tutorial, for the protocol you wire into the agent node below.

How n8n Bills Executions, and the Arithmetic Nobody Does First

An execution is one run of one workflow. Not one node, not one item, not one API call. A webhook firing once through twelve nodes is one execution; a workflow reading ten thousand rows into a warehouse is also one. Sub-workflow runs do not count towards the monthly limit, which is a real lever: push per-item work into a sub-workflow called from a loop and the parent still costs one.

So what drains the quota is never complexity. It is cadence.

Executions consumed per month by trigger cadence

One workflow, five triggers, against a 2,500 allowance.

Every 15 minutes96 runs a day
2,880over cap
Webhook50 events a day
1,500under cap
Every 30 minutes48 runs a day
1,440under cap
Hourly24 runs a day
720comfortable
Four times a daydigest pattern
120negligible

Runs per day multiplied by 30. Plan allowance as listed in October 2026.

The fix for an over-cap workflow is rarely a bigger plan. It is a webhook instead of a poll, a wider interval with a longer lookback window, or one schedule fanning out to sub-workflows instead of five schedules in parallel.

Option Listed cost Executions a month Who it fits
Community, self-hosted No licence fee, you pay for the server Bounded by your hardware Learning, internal glue, high-frequency jobs
Cloud Starter About 24 US dollars a month 2,500 One team, webhook-shaped work
Cloud Pro About 60 US dollars a month 10,000 Several teams, production webhooks
Enterprise Quoted Custom SSO, log streaming, multiple environments

Cloud plans now include unlimited workflows and users, where Starter once capped you at five active workflows and one user. Prices move, so treat these as the shape of the pricing rather than a quote.

The cap is a hard stop
  • No overage, no grace period. Hit the limit and workflows stop, so the failure mode is silent non-delivery.
  • Build your own tripwire. A daily workflow that checks your execution count and posts to Slack past 70 percent costs 30 executions a month.

n8n Self-Hosted: Queue Mode, Workers and the Real Resource Floor

Default self-hosting runs everything in one process on SQLite. Fine for a laptop and the Pune team's first three workflows, wrong the moment two run at once and you meet database locks. The production shape is queue mode: the main instance keeps the UI, API, webhooks and scheduler, Redis holds the job queue, and separate workers execute jobs against a shared Postgres.

n8n in queue mode

What each process owns, and what every box must share.

n8n queue mode architecture A trigger reaches the main n8n instance, which enqueues a job in Redis. Two worker processes pull jobs from Redis and execute them, running Code nodes on a task runner. The main instance and both workers share one Postgres database and the same encryption key. Webhook or Schedule trigger Main instance UI, API, webhooks, scheduler Redis job queue Worker 1 Worker 2 fires enqueue pull job Postgres, shared workflows, credentials, logs Task runner isolated Code node reads & writes writes execution rows hands off JS Every box above must share one N8N_ENCRYPTION_KEY, or stored credentials become unreadable.

Drawn from n8n's queue mode configuration documentation, checked 6 October 2026.

# set on the main instance AND every worker
EXECUTIONS_MODE=queue
QUEUE_BULL_REDIS_HOST=redis
QUEUE_BULL_REDIS_PORT=6379
DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=postgres
DB_POSTGRESDB_DATABASE=n8n
N8N_ENCRYPTION_KEY=the-same-value-everywhere

# then add capacity by adding workers
docker compose up -d --scale n8n-worker=3

Three rules fall out of that. Multiple processes need Postgres, because SQLite will not take concurrent writers. Every instance needs the same encryption key, or a worker pulls a job and cannot decrypt the credential it needs. And queue mode costs resources before it saves any: a main plus a few workers is realistically a 4 vCPU and 8 GB machine, moving to 8 vCPU and 16 GB once concurrency arrives. Add workers when queue depth keeps climbing through the day, not because three containers look serious.

That is ordinary cloud operations, which is the ground our AWS Solutions Architect and DevOps course runs live over 12 weeks, with the Azure architecture and DevOps track covering the same for a Microsoft shop.

Build Your First n8n AI Agent Node, Step by Step

This is what turned n8n from a Zapier alternative into something worth a line on your resume. The AI Agent node has sockets underneath it: a chat model, optionally a memory, and one or more tools. At runtime the model picks which tool to call, using each tool's name and description as its only guide.

  1. Add the Chat Trigger while developing, so you iterate in a chat panel instead of posting fake webhooks from your terminal.
  2. Attach one chat model and leave it alone until the agent behaves.
  3. Attach memory. Simple Memory keeps recent turns inside n8n with no external service. Swap in Postgres or Redis memory when conversations must survive a restart.
  4. Attach two tools: an HTTP Request Tool against an API you own, plus one app node your ops team already lives in. Write the descriptions as instructions to a new joiner, because that text is the whole interface the model gets.
  5. Attach an MCP Client Tool. One MCP server can publish dozens of tools and a single node surfaces them all with schemas, which beats hand-building a node per capability. Prefer a server speaking Streamable HTTP, since the older SSE transport is deprecated.
  6. Write the system prompt last. Name the tools, say when not to use them, and state what to do when one fails. Most "the agent is hallucinating" reports are really "nobody told it what to do on a 404".

What usually goes wrong here

The agent calls the same tool twice and does the same thing twice, because the current AI Agent and Memory implementation stores input and output messages but not tool messages, an open issue on the n8n repository. It has no record that it already sent the mail, so make tool steps idempotent rather than hoping the model remembers.

Then your deduplication will look broken while you test it. Static workflow data is the natural place for a "seen" key, and it is explicitly not saved during manual runs: the workflow must be active and triggered for real before writes persist. So you run it four times in the editor, see four duplicates, and start rewriting good code.

// Code node, run once for each item
const key = `${$json.ticket_id}:${$json.updated_at}`;
const store = $getWorkflowStaticData('global');
store.seen = store.seen || {};

if (store.seen[key]) {
  return [];               // already handled, drop the item
}
store.seen[key] = Date.now();

// keep the store from growing without limit
const keys = Object.keys(store.seen);
if (keys.length > 1000) {
  delete store.seen[keys[0]];
}

return [{ json: { ...$json, dedupe_key: key } }];

Past this point, agent design stops being an n8n question: tool granularity, retries, approval gates, cost per run. Our AI Engineer course builds that layer live, and the CCDV-F developer prep course drills the tool-use and MCP patterns its exam expects. Also read: how approval queues work, before you let an agent send external mail.

The n8n Tutorial Nobody Writes: Six Failures and Their Fixes

These share a root cause: n8n hides real distributed-systems behaviour behind a friendly canvas, so the failures arrive in unfamiliar clothes.

Symptom Cause Fix
Credentials fail to decrypt after you rebuild the container The new instance generated a fresh encryption key Set N8N_ENCRYPTION_KEY on every instance before first start
A Code node that worked for years fails after upgrading to 2.0 Task runners are on by default and block environment access Move the value into a credential, or grant access in the runner configuration
Nothing arrives at your webhook You shared the test URL, which listens only while the editor is open Activate the workflow and hand over the production URL
Every workflow stops mid-month on Cloud Execution cap reached, no overage, no grace period Widen schedules, move hot workflows to self-hosted, add a tripwire
Workers sit idle while the queue grows EXECUTIONS_MODE not queue on the worker, or a different Redis Set the mode and QUEUE_BULL_REDIS_HOST identically everywhere
A vendor API starts rate limiting you at an odd hour A node ran once per item across a few hundred items Put Split In Batches in front of it with a wait interval

A Real Deployment: Delivery Hero's Account Recovery Workflow

The most useful published n8n story is unglamorous, which is why it is believable. Delivery Hero's IT service delivery team handled roughly 800 account recovery requests a month, each taking around 35 minutes, so a population of employees was permanently locked out and unable to work. They moved approval to the employee's direct manager and had n8n call Okta, Jira and Google through their APIs, in one workflow their case study says took about five hours to build.

Average lockout time fell from 35 minutes to 20, which the case study puts at roughly 200 hours of employee time recovered a month. Two things are worth copying: the win came from removing a human queue rather than from clever nodes, and it was one workflow scoped to one process, the opposite of how most automation projects start.

Live course

Go from dragging nodes to building agents that plan, use tools and act

Live online·Sat–Sun, 8–11 PM IST·100+ hrs·Rs 24,999

The AI Engineer course is built around agents that plan, use tools and act, certified on both Microsoft Copilot Studio and Claude Code, the two stacks job postings are naming. You build RAG and agent systems live across 16 weeks rather than watching them.

Explore the course
AI Engineer Course: Generative AI, RAG & AI Agents (Microsoft + Claude Certified)

When Not to Use n8n

The canvas that makes n8n fast at 8 nodes makes it slow at 60. A pull request on a Python script shows four changed lines; on a workflow it shows a JSON blob with node coordinates in it. Once a workflow carries business logic several people edit and nobody dares break, you have built an application in a format you cannot review or unit test.

  • Moving real data volume. Row-by-row processing is the wrong engine for millions of records. That belongs in a pipeline tool, the ground our Microsoft Fabric data engineering course covers for DP-700, with reporting in the Power BI and PL-300 track.
  • Logic that needs tests. If the rule would warrant a unit test, write code and use n8n for the plumbing around it.
  • Latency-sensitive paths. Queue mode adds hops by design: good for throughput, wrong in front of a waiting user.
  • Anything you plan to resell. The Sustainable Use License permits internal business use and modification, not hosting n8n for others as a paid service.

That licence line matters in India, because the fastest-growing use of n8n here is agency work. An instance inside a client's own account is a service. One instance twelve clients log into is a product, and that is what the licence is written to stop.

Where This Pays Off, and What I Would Do

Back at the Pune firm, a realistic first year is three workflows: an exception alert watching a Postgres table, a document flow that files supplier invoices, and an agent answering "where is consignment X" from two internal APIs. Be clear-eyed about the career maths, though. n8n is a strong second skill and a weak first one, because nobody in India hires an "n8n developer" at a serious salary. They hire people who can design an agent, operate it and explain its failure modes. That operating half is what the MLOps Engineer course drills, the governance half is the AB-900 Copilot administration course once a Copilot tenant is involved, and the certifications overview shows which to aim at first.

So: install the Community edition tonight and give yourself a week to ship one workflow somebody other than you depends on. Keep it hourly or webhook-triggered, put the encryption key in your password manager on day one, and resist the clever build until the boring one has run a fortnight untouched. Then wire one AI Agent node with exactly two tools and watch where it does something stupid. That failure is the real lesson, and it transfers to every agent stack you touch afterwards. If that is the half you want to be good at, it is the AI Engineer course, and a free webinar will tell you in an evening whether the work suits you.

Frequently asked questions

Is this n8n tutorial enough to start building, or do I need to code?

You can build useful workflows with no code: triggers, app nodes, IF branches, a Slack message. The ceiling arrives when you must read a nested JSON field or reshape items for the next node, which is Code node work. Basic JavaScript is enough.

Is n8n free, and what is the catch with self-hosting?

The self-hosted Community edition has no licence fee and no execution limit, so you pay only for the server and your time. The catch is the Sustainable Use License: internal use and modification are allowed, hosting n8n as a paid service for others is not.

How many executions does one n8n workflow use?

One run is one execution, whatever the node or item count, and sub-workflow runs do not count towards the monthly limit. A 50-node workflow triggered twice a day costs 60 a month; a 3-node workflow on a 15-minute schedule costs 2,880.

What is the difference between n8n Cloud and self-hosting?

Cloud removes the operations work and charges by monthly executions, the entry plan including 2,500 as listed in October 2026. Self-hosting removes that ceiling and hands you Postgres, Redis, upgrades, backups and the encryption key.

How do I build an AI agent in n8n?

Add the AI Agent node, attach a chat model, attach memory if the conversation needs continuity, then attach tools as sub-nodes. Tool descriptions are the only interface the model gets, so write them as instructions.

Why did my n8n workflow stop running by itself?

On Cloud, usually the execution cap, which stops workflows with no overage and no grace period. On self-hosted, check the workflow is active rather than merely saved, and that you did not hand out a test webhook URL, which listens only while the editor is open.

About this guide. 360 Digital Transformation is an Anthropic Partner and a Microsoft Authorized Training Partner. Other certification bodies, vendors and employers named here are not affiliated with us. Tools and versions change quickly; commands and figures cited were checked on 6 October 2026.

Learn it live with 360 Digital Transformation

Turn this guide into a skill employers can see

Live weekend cohortEMI available

AI Engineer Course: Generative AI, RAG & AI Agents (Microsoft + Claude Certified)

Rs. 27,999Rs. 37,239 Save 24%

Tools and platforms you work with

  • Python
  • Claude API
  • FAISS
  • ChromaDB
  • LangChain
  • LangGraph
  • CrewAI
  • AutoGen (AG2)
Add bonus modules
See the syllabus and batch dates

Other live courses on this career path