AI for Automation

n8n — The Complete Guide

n8n is an open-source workflow automation platform you can run on your own servers for free. 400+ integrations, write JavaScript in any step, built-in AI agent nodes for LLM workflows. Cheaper than Zapier at scale — pay per execution, not per task. Cloud plans from €24/month. Self-host free.

Open Source AutomationSelf-host freeCloud from €24/month400+ integrationsLast reviewed: April 2026

What is n8n?

n8n is an open-source workflow automation platform that you can self-host on your own servers or use via n8n's cloud service. It connects apps, automates workflows and builds AI agent pipelines — similar to Zapier and Make, but with a key difference: you can run it entirely on your own infrastructure, giving you complete control over your data and no vendor lock-in.

n8n uses a node-based visual canvas similar to Make. Workflows are built by connecting nodes — each node representing an app action, a transformation, an AI model call, or custom code. Unlike Zapier and Make, n8n lets you write JavaScript or Python directly inside any workflow step, giving technical users unlimited flexibility when the built-in options are not enough.

In 2025, n8n raised $180 million at a $2.5 billion valuation from Accel, with participation from Nvidia. It reached $40 million in annual recurring revenue and serves over 3,000 enterprise customers including Vodafone, Softbank and Seat. The community has over 45,000 members and 400+ pre-built integrations.

What makes n8n different

Self-hostable and open source — n8n's community edition is completely free to self-host. You run it on your own server, your data never leaves your infrastructure, and there is no per-execution cost. This is the key reason organisations in regulated industries — healthcare, finance, legal — choose n8n over Zapier or Make.

Execution-based pricing — When using n8n cloud, you pay per workflow execution — not per task or per operation. An execution is one run of an entire workflow, regardless of how many steps it has. A 20-step workflow running 1,000 times = 1,000 executions. The same workflow on Zapier = 20,000 tasks. This makes n8n dramatically cheaper for complex, multi-step automations at scale.

Code anywhere — In any workflow step, you can write JavaScript or Python directly. This is not a workaround — it is a first-class feature. When no built-in node does exactly what you need, write five lines of code instead of wrestling with visual configuration or paying for a premium connector.

AI agent capabilities — n8n has built-in AI nodes for connecting to LLMs, building RAG (Retrieval Augmented Generation) pipelines, and creating multi-agent workflows. According to n8n's official product page, it is "the big unlock" that allows AI tools like ChatGPT and Claude to be integrated into business workflows safely and with controlled data flow.

Who n8n is for

n8n is best suited for technical teams and organisations with specific data privacy requirements. If your team has someone who can manage a server or run Docker containers, n8n's self-hosted option is the most cost-effective and most flexible automation platform available. Many agencies also use n8n to build and host automation systems for clients.

It is not the right choice for non-technical users who want to set up an automation in 10 minutes without touching any infrastructure. For that profile, Zapier or Make are better starting points.

Why not just use Zapier or Make?

Data sovereignty is the first reason. If your workflows process sensitive customer data, healthcare information or financial records, running automation through a third-party cloud service may not be acceptable for compliance reasons. n8n self-hosted keeps all data on your servers.

Cost at scale is the second reason. A complex workflow with 15 steps running 10,000 times per month = 10,000 n8n executions vs 150,000 Zapier tasks. At Zapier's Professional plan pricing that would require a significant upgrade. The same workflow on n8n Pro cloud costs €60 per month.

Custom code is the third. When a workflow needs logic that cannot be expressed in visual builder nodes, n8n's JavaScript and Python support handles it natively. In Zapier or Make, custom code requires webhooks and additional services.

Is n8n free?

The Community Edition is completely free — you download and self-host it at no cost. Cloud plans start at €24 per month (Starter) for 2,500 executions. Pro is €60 per month for 10,000 executions with team collaboration features. Business is €800 per month for enterprise governance including SSO, RBAC, audit logs and unlimited workflows. A Startup Program offers 50% off the Business plan for qualifying companies under 20 employees.

Getting started with n8n

Option A — n8n cloud (fastest start)

Go to n8n.io and start a free trial. No setup required. You get a fully hosted n8n instance immediately. Free trial for 14 days, then Starter at €24/month. This is the right choice if you want to evaluate n8n before deciding whether to self-host.

Option B — Self-hosted with Docker (recommended for production)

If you have Docker installed, run n8n with a single command:

Docker quick start
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n docker.n8n.io/n8nio/n8n

Open localhost:5678 in your browser. For a production deployment with persistence, use Docker Compose with a PostgreSQL database and configure a reverse proxy (nginx or Caddy) in front of n8n.

Building your first workflow

n8n's canvas works like Make: add nodes, connect them with edges, data flows left to right. Click Add first step to search for a trigger. Then add action nodes to the right. Use the Execute workflow button at the bottom to test with real data. Every node shows its input and output data inline — you can see exactly what each step received and produced without leaving the canvas.

17 n8n workflow ideas

AI agent workflows (n8n's strongest category)

AI email triage agent
When a new email arrives in [Gmail/Outlook], send the subject and body to [Claude/GPT] via the AI Agent node with instructions: classify as Sales/Support/Billing/Spam, extract the sender's intent in one sentence, and suggest a priority level (High/Medium/Low). Route using n8n's Switch node: High priority emails → Slack alert + CRM task. Support emails → create support ticket. Billing → forward to accounting. Spam → mark and archive.
Document Q&A system with RAG
Build a document Q&A workflow. When a new document is added to [Google Drive folder], extract text, split into chunks, generate embeddings using [OpenAI/local model], and store in [Pinecone/Supabase vector DB]. When a user submits a question via [Slack/webhook], retrieve the most relevant chunks, send to AI with the question for grounded answers, and return the response with source citations.
Competitive intelligence monitor
Every day at 8 AM, check: competitor blog RSS feeds for new posts, [G2/Capterra] for new reviews of competitor products, and Google News for mentions of [competitor names]. Send each item to Claude for a brief analysis of: what changed, what it means for us, and if any immediate action is warranted. Compile into a daily briefing sent to [Slack channel] and [email].
AI meeting summariser
When a meeting transcript is uploaded to [Google Drive/Notion], extract the full text. Send to [Claude/GPT] with instructions to: write a 3-sentence executive summary, list all action items with the responsible person's name, identify any decisions made, and flag any risks or blockers mentioned. Post the summary to [Slack] and create tasks in [Asana/Linear] for each action item.

Data and integration workflows

Database to database sync
Every 30 minutes, query [PostgreSQL/MySQL] for all records modified in the last 30 minutes. For each record, use the Function node to transform the data format if needed. Upsert each record to [second database/API]. Log all sync operations to a separate audit table with timestamp, record ID and sync status. Alert via Slack if error rate exceeds 1%.
API data aggregation
Every hour, call APIs from [5 different services]. Use the Merge node to combine results into a single dataset. Clean the data with a Function node — standardise date formats, normalise company names, deduplicate records. Write the combined clean dataset to [Google Sheets/PostgreSQL]. Send a summary of what was collected to [Slack].
GitHub to project management
When a new GitHub issue is created with label 'bug', create a task in [Linear/Jira] with the issue title, body and labels. Assign to the developer based on which file the bug is reported in (use a mapping table in n8n's static data). Post to [engineering Slack channel] with the bug severity and assigned developer. When the GitHub issue is closed, mark the project management task as complete.

Business process workflows

Customer churn detection
Every week, query your database for customers who: have not logged in for 30+ days, have decreasing usage compared to previous month, have open support tickets older than 7 days, or have not used a key feature in their last 10 sessions. For each at-risk customer, create a CRM task for the account manager, send a personalised check-in email from the account manager, and log to a churn risk spreadsheet.
Automated reporting pipeline
Every Monday at 6 AM, connect to [analytics database] and run a report query. Format the results into a clean table using the Function node. Generate charts using [Quickchart API]. Compile into a Google Doc using the template. Send via email to the leadership team with the doc attached. Post key metrics to [Slack #metrics channel] formatted as a text summary.
Webhook processing pipeline
Set up a webhook endpoint in n8n to receive events from [your application]. Parse the incoming JSON. Validate required fields — if missing, return a 400 error with details. Route by event type using Switch node: 'payment' events → update subscription in database + send receipt email. 'signup' events → create in CRM + trigger onboarding sequence. 'error' events → create alert + page on-call engineer.
Scheduled data backup
Every night at 2 AM, connect to [primary database]. Export all records modified in the last 24 hours. Compress the export. Upload to [AWS S3/Google Cloud Storage] with a filename including the date and time. Send a confirmation to [Slack] with the backup size and location. If the backup fails for any reason, send an immediate alert and create an incident ticket.
Social media scheduler
When a new row is added to [Google Sheet] with a publish date and content for each platform, n8n waits until the scheduled time using the Wait node. On the scheduled date and time, post to [Twitter via API], [LinkedIn Company Page], and [Facebook Page] simultaneously. Log the posted URLs and engagement metrics back to the sheet after 24 hours.

n8n tips for technical users

Use the Function node liberally. Any time you need logic that does not fit a built-in node, add a Function node and write JavaScript. Parse a weird API response, transform data between schemas, calculate business logic — all of this is cleaner as 10 lines of JS than as a chain of workaround nodes.

Use environment variables for all credentials and config. n8n supports environment variables. Store API keys, database URLs and configuration values as env vars rather than hardcoding them in workflows. This makes moving between development and production environments clean.

Set up error workflows. n8n lets you define a global error workflow — a workflow that runs whenever any other workflow fails. Use this to send Slack alerts, log errors to a database or create incident tickets whenever production workflows break.

Use n8n's community templates. The n8n community has published thousands of workflow templates. Before building from scratch, search at n8n.io/workflows for pre-built solutions to common use cases. The community of 45,000+ members has already solved most standard automation problems.

For self-hosted: set up PostgreSQL as the database. n8n uses SQLite by default for self-hosted deployments. For any production use, switch to PostgreSQL. It is significantly more reliable under concurrent load and makes backup and restore procedures standard.

Technical architecture

n8n is source-available software maintained by n8n GmbH, a Berlin-based company founded in 2019. The codebase is available on GitHub under a fair-code licence — free to use and self-host, but commercial use of the software to provide automation services to third parties requires a commercial licence. According to n8n's official documentation, the platform handles up to 220 workflow executions per second on a single instance in queue mode.

Execution model

n8n processes workflows as a graph of nodes. Each node receives input data, processes it according to its configuration, and passes output to connected nodes. Nodes can run in parallel when they are not dependent on each other. The queue execution mode uses Redis for job queuing and multiple worker processes for scale. Per n8n's official pricing documentation, one execution = one run of the entire workflow from start to finish, regardless of step count.

AI and LLM integration

n8n has built-in AI nodes that connect directly to OpenAI, Anthropic, Google, Cohere and other LLM providers. The AI Agent node handles multi-turn agent workflows with tool use. The Chain nodes implement LangChain patterns (LLM chains, document loaders, vector store retrievers) natively within workflows. Per n8n's official features page, you can "enforce structured inputs and outputs to control the data flow to and from AI steps" and "combine human-in-the-loop approvals with rule-based automation to contain AI actions."

Security features (enterprise)

n8n's enterprise plan includes SSO with SAML and LDAP, encrypted secret stores (AWS Secrets Manager, Azure Key Vault, GCP, HashiCorp Vault, Infisical), RBAC permissions, audit logs with SIEM streaming, and Git-based version control for workflows. SOC 2 Type II certification and regular external penetration tests are documented on n8n's security page.

Pricing (verified April 2026, cloud plans in euros)

  • Community (self-hosted): Free — unlimited workflows, unlimited users
  • Starter (cloud): €24/month — 2,500 executions/month
  • Pro (cloud): €60/month — 10,000 executions, team collaboration, environments
  • Business (cloud): €800/month — SSO, RBAC, audit logs, unlimited executions
  • Startup Program: 50% off Business for companies under 20 employees
  • Enterprise (self-hosted): Custom licence pricing
Primary sources cited in this guide