All posts
AI Tools 13 min read March 30, 2026

n8n: Automate Everything — The Developer's Alternative to Zapier

A practical guide to n8n — the self-hosted workflow automation tool with 400+ integrations, AI-native capabilities, and the power of custom code. Setup, usage, 5 standout features, and honest review.

#n8n#Workflow Automation#Self-hosted#AI Agents#No-code#LangChain
Neel Shah Tech Lead · Senior Data Engineer · Ottawa

Zapier works until you need to do something it cannot do. Then you are either writing custom webhooks, paying for enterprise tiers, or wishing you had built it yourself.

n8n is what you build instead. It is a workflow automation platform for technical teams — visual like Zapier, but with 400+ integrations, the ability to run arbitrary JavaScript or Python at any point in a workflow, full self-hosting, and AI agent capabilities built in. 181,000 GitHub stars. The most starred workflow automation tool on GitHub.

This guide covers everything from a five-minute setup to the five features that make n8n worth using over anything else.


Before We Start: What You Need

n8n runs in three ways. The fastest is npm — no Docker required.

Requirements (npm path)
─────────────────────────────────────────
  Node.js    18 or later
  npm        any recent version
  RAM        1 GB minimum (2 GB recommended)
  OS         Linux, macOS, Windows

Check Node.js:

node --version
# v20.x.x  ← fine
# v16.x.x  ← upgrade recommended

For Docker:

Requirements (Docker path)
─────────────────────────────────────────
  Docker     20.10.0 or later
  RAM        1 GB minimum

Installation

Option A: npx (fastest — no install)

npx n8n

n8n downloads, starts, and opens at http://localhost:5678. Data is stored in your home directory at ~/.n8n.

This is the fastest way to try n8n but does not persist between reboots. Use the npm global install for anything you want to keep running.

npm install -g n8n
n8n start
docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

The -v flag persists your workflows to the n8n_data Docker volume. Without it, your workflows disappear when the container stops.

Accessing n8n

All three options open n8n at:

http://localhost:5678

On first load, create an admin account. Then you are in the workflow editor.


Your First Workflow: Step by Step

Let us build a real workflow — one that checks a URL every hour and sends a Slack message if the page content changes.

Step 1 — Create a new workflow

Click + New Workflow in the top bar.

Step 2 — Add a Schedule trigger

Click Add first stepOn a schedule. Set it to run every hour.

Schedule trigger settings:
  Mode:      Interval
  Interval:  1 hour

Step 3 — Add an HTTP Request node

Click the + button after the trigger. Search for HTTP Request. Configure it:

Method:   GET
URL:      https://example.com/page-to-monitor

Step 4 — Add a Code node

Add a Code node. This is where n8n becomes different from other automation tools. Write any JavaScript you need:

// Check if content changed since last run
const currentContent = $input.first().json.body;
const lastContent = $workflow.staticData.lastContent || "";

if (currentContent === lastContent) {
  return []; // Return empty — nothing changed, stop the workflow
}

// Store new content for next run
$workflow.staticData.lastContent = currentContent;

return [{
  json: {
    changed: true,
    preview: currentContent.slice(0, 200)
  }
}];

Step 5 — Add a Slack node

Add a Slack node. Connect your Slack workspace (n8n will prompt you through OAuth). Configure the message:

Channel:  #monitoring
Text:     Page changed! Preview: {{ $json.preview }}

Step 6 — Test and activate

Click Test workflow to run it once manually. Check the output of each node. When it looks right, click Activate (top right toggle).

The workflow is now running on schedule, with no server to maintain beyond keeping n8n itself running.


How n8n Is Structured

Before going deeper, understand n8n’s three main concepts:

n8n concepts
──────────────────────────────────────────────────────────
  Node        A single step in the workflow.
              Examples: HTTP Request, Slack, Code, If, Merge

  Workflow    A directed graph of connected nodes.
              Triggered by events, schedules, or webhooks.

  Execution   One run of a workflow.
              n8n logs every execution — input, output, errors.
──────────────────────────────────────────────────────────

Data flows between nodes as JSON arrays. Each node receives the output of the previous node(s) and produces its own output.

Data flow example
──────────────────────────────────────────────────────────
  [Schedule] → triggers with: [{json: {timestamp: "..."}}]

  [HTTP Request] → receives: [{json: {timestamp: "..."}}]
                 → produces: [{json: {statusCode: 200, body: "..."}}]

  [Code]         → receives: [{json: {statusCode: 200, body: "..."}}]
                 → produces: [{json: {changed: true, preview: "..."}}]

  [Slack]        → receives: [{json: {changed: true, preview: "..."}}]
                 → produces: [{json: {ok: true, ts: "..."}}]
──────────────────────────────────────────────────────────

This consistent JSON structure means you can reference any previous node’s output at any point using expressions like {{ $('HTTP Request').item.json.body }}.


The 5 Standout Features

Feature 1: Code Node — JavaScript and Python at Any Point

Every visual automation tool eventually hits a wall: you need to do something the built-in nodes do not support. In Zapier, you work around it with complex filter logic or pay for Zapier’s Code step. In n8n, the Code node is a first-class part of every workflow, available for free.

You can write JavaScript or Python. The code runs server-side, has access to all items from the previous node, and can return any data structure.

// JavaScript example: parse and transform data
const items = $input.all();

return items.map(item => {
  const raw = item.json;

  return {
    json: {
      name: raw.full_name.split(' ')[0],
      email: raw.email.toLowerCase().trim(),
      signup_date: new Date(raw.created_at).toISOString().split('T')[0],
      is_enterprise: raw.plan === 'enterprise' || raw.monthly_spend > 500
    }
  };
});

Python is also supported (requires Python installed on the server):

# Python example: use any Python library
import json
from datetime import datetime

items = _input.all()

results = []
for item in items:
    raw = item["json"]
    results.append({
        "json": {
            "processed_at": datetime.now().isoformat(),
            "value": raw["amount"] * 1.2  # apply 20% markup
        }
    })

return results

You can also use the AI node to write this code for you — describe what you want to transform in plain English and n8n generates the JavaScript.

Why this matters: Every workflow eventually has edge cases. The ability to drop into code at any point — without leaving n8n — means you never need a separate script that runs outside the workflow. Everything stays in one place.


Feature 2: AI-Native Workflows With LangChain Integration

n8n has a built-in AI agent system powered by LangChain. You can build AI agent workflows visually using the same n8n interface — no Python environment, no separate LangChain setup.

n8n AI Agent workflow
──────────────────────────────────────────────────────────
  [Chat Trigger]   ← user sends a message


  [AI Agent]       ← LangChain-powered agent

       ├── Tool: [HTTP Request]     can call any API
       ├── Tool: [Google Sheets]    can read/write spreadsheets
       ├── Tool: [Send Email]       can send emails
       └── Tool: [Code]             can run custom logic


  [Chat Response]  ← send answer back to user
──────────────────────────────────────────────────────────

The AI Agent node configuration:

Model:       Choose from OpenAI, Anthropic, Ollama, etc.
Memory:      Window buffer (last N messages)
System prompt: "You are a customer support agent..."
Tools:       Any n8n nodes you drag into the agent

The agent decides which tools to use based on the user’s message. You do not program the decision logic — the LLM handles that.

You can connect your own data by adding a Vector Store node and a RAG tool to the agent:

[AI Agent]
  ├── Tool: [Vector Store Retriever]  ← search knowledge base
  ├── Tool: [HTTP Request]            ← call external APIs
  └── Tool: [Send Slack Message]      ← take action

Why this matters: Most n8n users discover AI agents as an upgrade to their existing workflows — not a separate project. If you already automate your Slack messages and Google Sheets updates in n8n, adding an AI layer on top is a few nodes, not a whole new system.


Feature 3: 400+ Integrations and 900+ Templates

n8n ships with integrations for over 400 services. Not thin “send a webhook” integrations — proper API integrations with full authentication and the most common operations pre-built.

Selected integrations by category:

Communication:   Slack, Gmail, Outlook, Discord, Telegram, WhatsApp
CRM:             Salesforce, HubSpot, Pipedrive, Notion
Storage:         Google Drive, Dropbox, S3, OneDrive
Databases:       PostgreSQL, MySQL, MongoDB, Redis, Supabase
Project mgmt:    Jira, Linear, Asana, Trello, GitHub
AI/ML:           OpenAI, Anthropic, Pinecone, Hugging Face
E-commerce:      Shopify, WooCommerce, Stripe
Calendar:        Google Calendar, Outlook Calendar

If a service is not in the list, the HTTP Request node and Webhook trigger cover any REST API. Configure the URL, method, headers, and body manually — you effectively have a universal connector.

The Template library has 900+ ready-to-use workflows. Filter by use case, integration, or industry. Import a template, configure your credentials, and activate in minutes.

Example templates worth knowing:

TemplateWhat it does
Slack alert on new GitHub PRPosts to Slack when a PR is opened
AI email categoriserReads Gmail, tags and sorts emails with GPT
CRM syncKeeps HubSpot and Salesforce in sync
Report generatorPulls data from multiple sources, generates PDF
Social media schedulerPosts across platforms on a schedule

Why this matters: Building a workflow that connects five services is four times as fast when you have pre-built integrations for all five. n8n’s integration depth (proper OAuth, proper operations, proper error handling) saves hours of reading API docs.


Feature 4: Full Self-Hosting — Your Data Never Leaves Your Infrastructure

n8n’s self-hosted version gives you complete control. Every workflow execution, every piece of data processed, every credential — it all stays on your server.

Self-hosted n8n data flow
──────────────────────────────────────────────────────────
  External service  →  n8n (your server)  →  External service
  (Stripe webhook)     (runs workflow)       (update database)

  Data path: external → your server → external
  Your data NEVER passes through n8n's cloud.
──────────────────────────────────────────────────────────

This matters for:

  • GDPR compliance — customer data stays in EU infrastructure
  • Healthcare — PHI stays on-premises
  • Finance — transaction data never leaves your control
  • Enterprise security — credentials stored in your secret manager, not a third-party vault

The Docker deployment makes this straightforward:

# Production setup with persistent storage and auto-restart
docker run -d \
  --name n8n \
  --restart unless-stopped \
  -p 5678:5678 \
  -e N8N_HOST=your-domain.com \
  -e N8N_PROTOCOL=https \
  -e N8N_ENCRYPTION_KEY=your-encryption-key \
  -v /opt/n8n-data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

For enterprise deployments with multiple workers, n8n supports:

  • Queue mode — separate worker processes via Redis
  • PostgreSQL — instead of the default SQLite
  • Kubernetes — Helm chart available

Why this matters: Every SaaS automation tool is a single-point-of-failure for your workflows and a potential data exposure risk. Self-hosting with n8n removes both concerns. If n8n.io goes down, your automations keep running on your own server.


Feature 5: Execution History and Error Handling

Every workflow execution in n8n is logged. You can see:

Execution log for a single run
──────────────────────────────────────────────────────────
  Workflow:   Customer order processor
  Triggered:  2026-03-23 14:32:01
  Status:     ✓ Success
  Duration:   1.2s

  Node 1: Webhook trigger       ✓  12ms
  Node 2: HTTP Request          ✓  340ms
  Node 3: Code (transform data) ✓  8ms
  Node 4: Postgres (insert)     ✓  45ms
  Node 5: Slack notify          ✓  210ms
──────────────────────────────────────────────────────────

For failed executions:

  Status:  ✗ Error
  Node 3:  Code (transform data)  ✗ FAILED
    Error: Cannot read property 'email' of undefined
    Input:  { "user": null }    ← the data that caused the failure

You can click on any node in the execution to see its exact input and output. You can also retry a failed execution — fix the workflow, then rerun with the original data.

n8n has a built-in Error Workflow feature: designate a separate workflow to run whenever any other workflow fails. That error workflow can:

  • Send a Slack alert with the error details
  • Create a Jira ticket
  • Log to a database
  • Retry the failed workflow after a delay
Error workflow example
──────────────────────────────────────────────────────────
  [Error Trigger]

       ├── "Which workflow failed?"
       ├── "What was the error message?"
       └── "What was the input data?"


  [Slack: notify #ops-alerts]
  "Workflow 'Order processor' failed
   Error: Cannot read 'email' of undefined
   Execution ID: 12345 — click to view"
──────────────────────────────────────────────────────────

Why this matters: Production workflows fail. The question is not whether a failure will happen but whether you will know about it and be able to fix it. n8n’s execution history makes failure visible and actionable — not silent.


n8n vs Zapier vs Make: Quick Comparison

Feature comparison
──────────────────────────────────────────────────────────
  Feature                n8n      Zapier    Make (Integromat)
  ──────────────────────────────────────────────────────
  Self-hosting           Yes      No        No
  Custom code            Yes      Limited   Limited
  AI agent workflows     Yes      Limited   No
  Open source            Yes*     No        No
  Free tier              Yes      Yes       Yes
  Integrations           400+     6,000+    1,000+
  Templates              900+     Yes       Yes
  Data stays with you    Yes      No        No
  Price (paid tiers)     Lower    Higher    Medium
──────────────────────────────────────────────────────────
  * Fair-code license — source visible, self-hosting allowed

Zapier wins on integration count. n8n wins on everything else that matters for technical teams.


License Note: Fair-Code, Not Fully Open Source

n8n uses a Sustainable Use License (fair-code, not fully open source). What this means in practice:

What you CAN do:
  ✓ Self-host n8n for your own organisation
  ✓ Inspect and modify the source code
  ✓ Use it internally for any purpose

What you CANNOT do:
  ✗ Offer n8n as a managed service (SaaS) to customers
  ✗ White-label and resell n8n

For 99% of use cases — individuals, startups, and enterprises running n8n for internal automation — the license is effectively identical to a permissive open-source license. The restriction only applies if you want to build a competing automation SaaS product.


Troubleshooting

Workflows stop running after server restart

The npx n8n and npm start approaches do not set up a system service. Use a process manager to keep n8n running:

# Using pm2
npm install -g pm2
pm2 start n8n
pm2 save
pm2 startup   # follow the printed instructions

Or use the Docker path with --restart unless-stopped.

Credentials not saving

Credentials are encrypted with the N8N_ENCRYPTION_KEY environment variable. If this is not set consistently, credentials saved in one run will not be readable in the next.

Set a permanent encryption key:

# Add to your ~/.bashrc or ~/.profile
export N8N_ENCRYPTION_KEY="your-consistent-random-key"

Execution is very slow on the first run

The first execution of a workflow that uses npm-installed nodes may be slow as dependencies load. Subsequent runs are significantly faster. This is normal behaviour on the npm install path.

Webhook URL is localhost (not accessible externally)

By default, n8n generates webhook URLs with localhost. For external services to call your webhooks, set your public hostname:

export WEBHOOK_URL=https://your-n8n.example.com/

What Is Great, What Is Good, What Still Needs Work

What is great

Code + visual is the right hybrid for developers. The ability to drop into JavaScript or Python at any point in a workflow — without leaving the visual editor — is the key differentiator. n8n does not try to replace code; it wraps code in a visual graph that makes workflows inspectable and maintainable.

AI-native is not bolted on. The LangChain-based AI agent system is a first-class part of n8n, not an afterthought. You can build intelligent, tool-using agents using the same nodes and credentials as the rest of your automations.

Self-hosted data control. In a world where every SaaS tool wants to hold your data, n8n’s self-hosted model is a genuine competitive advantage for any organisation with data sensitivity requirements.

What is good

181,000 GitHub stars translates into a massive template library, active community support, and fast bug fixes. The community Slack is active and the GitHub issues are typically triaged within days.

Fair-code means you can read everything. Even if you never modify it, being able to read the source code means you can understand exactly what n8n does with your data and credentials.

What still needs work

Fully open-source license. The Sustainable Use License is reasonable, but it creates ambiguity for organisations that need to comply with open-source policies. A proper open-source license would remove that friction.

Mobile interface. The n8n workflow editor is not usable on mobile. For monitoring and manual triggers on the go, the experience is poor.

Cold start time. On npm installs, n8n’s startup time is 10–30 seconds. For Docker, the first start after a pull is slow. This is a minor inconvenience for development, a non-issue for production (keep it always-on), but worth knowing.


Summary

n8n is the right choice for technical teams who need workflow automation that does not get in your way. The visual builder handles the common case; the code node handles everything else. The AI agent system means you can add intelligence to any existing workflow. The self-hosted model means your data stays yours.

The five standout features:

FeatureWhy it matters
Code node (JS + Python)No ceiling — any logic at any point
AI-native LangChain agentsIntelligent, tool-using agents in existing workflows
400+ integrations + 900 templatesConnect anything, start from a template
Full self-hostingYour data never leaves your infrastructure
Execution history + error handlingProduction failures are visible and recoverable

To get started:

npx n8n

Then open http://localhost:5678 and build your first workflow.

For production:

docker run -d \
  --name n8n \
  --restart unless-stopped \
  -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

The GitHub repo is at github.com/n8n-io/n8n. With 181,000 stars and the most active workflow automation community outside of Zapier, it is the technical team’s automation tool of choice.

Frequently asked questions

What is n8n: Automate Everything — The Developer's Alternative to Zapier about?

A practical guide to n8n — the self-hosted workflow automation tool with 400+ integrations, AI-native capabilities, and the power of custom code. Setup, usage, 5 standout features, and honest review.

Who should read this article?

This article is written for engineers, technical leads, and data teams working with n8n, Workflow Automation, Self-hosted.

What can readers use from it?

Readers can use the article as a practical reference for ai tools decisions, implementation tradeoffs, and production engineering workflows.