← Knowledge Base

n8n

The fair-code workflow automation platform that combines AI agents, 500+ integrations, and visual building into one powerful tool. Self-host or use the cloud.

Introduction

n8n (pronounced "n-eight-n", short for "nodemation") is a fair-code licensed workflow automation platform that gives you a visual node-based editor for connecting apps, APIs, and AI models. Founded in Berlin in 2019 by Jan Oberhauser, n8n has grown into one of the most popular open-source alternatives to Zapier and Make, with over 195,000 GitHub stars and 200,000+ community members.

What sets n8n apart is its commitment to being "fair-code" -- the source code is publicly available, you can self-host it for free with no limitations, and you have full control over your data. It supports over 500 integrations out of the box, and with its built-in AI agent capabilities, you can build everything from simple data syncs to complex multi-agent AI workflows. Every step of your automation is visible on the canvas, from a single API call to a full LLM reasoning chain.

📜

History

n8n GmbH was founded in 2019 by Jan Oberhauser in Berlin, Germany, and launched the first version of its platform in October of that year. The name "n8n" is an abbreviation of "nodemation" -- node-based automation, reflecting its core visual programming paradigm.

Funding History

RoundAmountDateLead Investors
Seed$1.5MMarch 2020Sequoia Capital, firstminute capital
Series A$12MApril 2021Felicis Ventures, Sequoia, firstminute, Harpoon
Series B€55M (~$60M)March 2025Highland Europe, HV Capital
Series C$180MOctober 2025Accel, Sequoia, Nvidia NVentures, Redpoint

The Series C round in October 2025 brought n8n's valuation to $2.5 billion, with participation from Nvidia's corporate venture arm NVentures, signaling strong belief in n8n's AI-powered automation future. The company went from 16,000 community members at launch to over 200,000 by 2026, with a 4.9/5 star rating on G2.

Key Features

  • Visual Node-Based Editor - Drag and drop nodes to build workflows. No coding required for most integrations, but full code support (JavaScript/Python) when you need it.
  • 500+ Built-in Integrations - Pre-built nodes for Google Workspace, Slack, Salesforce, GitHub, OpenAI, PostgreSQL, and hundreds more. Custom API connections for everything else.
  • AI Agent Support - Connect any LLM model, build multi-agent setups, implement RAG systems, and inspect every AI decision on the canvas. Supports cloud and offline models.
  • Fair-Code Licensing - Source code is publicly available. Free to self-host with no feature limitations, user limits, or hidden costs. Only pay if you use the cloud.
  • Self-Hosted or Cloud - Deploy on your own infrastructure with Docker, or use n8n Cloud for a managed experience. Your data stays on your servers when self-hosting.
  • Human-in-the-Loop - Add approval steps, manual inputs, and review gates to your workflows. AI actions can be contained with structured inputs and outputs.
  • MCP Support - Built-in Model Context Protocol support allows connecting to external tools and data sources. Can serve as an MCP server for Claude Desktop and other AI clients.
  • Code When You Need It - Use the visual editor for 80% of your workflow, then drop into JavaScript or Python code nodes for custom logic, data transformation, or API calls.
  • Sub-workflows - Create reusable workflow templates that can be called from other workflows. Perfect for standardizing common automation patterns across teams.
  • Error Handling - Built-in retry logic, error workflows, and detailed execution logs. Every step is traceable from trigger to completion.
  • Queue Mode - Scale out with worker processes that consume jobs from Redis. Main instance handles timers and webhooks; workers handle execution.
🏗️

Architecture

n8n is built on Node.js and TypeScript, with workflows modeled as directed graphs of nodes. Each node represents a single operation -- fetching data from an API, transforming it, sending it somewhere else, or invoking an AI model. Nodes are connected by edges that define the data flow.

Key Components

  • Main Instance - Handles HTTP requests, webhook triggers, timer-based scheduling, and the visual editor UI. Runs the workflow execution engine.
  • Queue Mode (Scale-Out) - For production deployments, worker processes consume execution jobs from a Redis message broker. Workers are independent Node.js instances that can run on separate machines, handling multiple simultaneous workflow executions.
  • Database Backend - Supports SQLite (default for development), PostgreSQL (recommended for production), and MySQL. Stores workflow definitions, execution history, credentials, and user accounts.
  • Webhook Engine - Built-in HTTP server that listens for incoming webhooks from external services. Each webhook URL is unique per workflow and can be secured with credentials.
  • Execution Engine - The runtime that walks the directed graph of nodes, passing data from one node to the next. Supports parallel execution branches, conditional paths, and error handling.

Deployment Options

MethodCommand
npm (quick start)npx n8n
Dockerdocker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n
Docker Composedocker compose up -d (with n8n + PostgreSQL + Redis)
Cloud (managed)Sign up at n8n.io for a hosted instance
💻

Installation Guide

n8n is incredibly easy to get started with. Here are the most common installation methods:

Quick Start with npx

The fastest way to try n8n. Requires Node.js 18+:

npx n8n

Opens the editor at http://localhost:5678. Your data is stored locally in ~/.n8n.

Docker (recommended for production)

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  n8nio/n8n

Docker Compose (production with PostgreSQL + Redis)

Create a docker-compose.yml:

services:
  n8n:
    image: n8nio/n8n
    ports:
      - "5678:5678"
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=password
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=168
    volumes:
      - ~/.n8n:/home/node/.n8n
    depends_on:
      - postgres
    restart: unless-stopped

  postgres:
    image: postgres:16
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped

volumes:
  postgres_data:

n8n Cloud (no setup needed)

For the quickest path, sign up at n8n.io and start building immediately. Cloud plans include automatic updates, managed infrastructure, and priority support.

🧠

Core Concepts

Understanding these core concepts will help you build powerful workflows in n8n:

Workflows

A workflow is a directed graph of nodes. It starts with a trigger node (webhook, schedule, manual) and ends when all branches complete. Workflows can be activated to run automatically or run manually for testing.

Nodes

Each node is a single operation. n8n categorizes nodes into three types: Trigger Nodes that start workflows (webhook, schedule, email), Action Nodes that do something (send an email, create a record, transform data), and Flow Nodes that control execution (IF conditions, loops, merge, split). Each node has typed input/output ports so you know exactly what data format to expect.

Expressions

n8n uses a powerful expression system based on JavaScript template literals. You can reference data from previous nodes, transform values, combine data sources, and build dynamic parameters. Expressions are denoted by {{ }} syntax and give you full programmatic control within the visual editor.

Executions

Each time a workflow runs, it creates an execution record. You can view detailed execution logs showing every node's input and output data, making debugging straightforward. Execution data can be pruned automatically based on age or count to save storage.

Credentials

Credentials in n8n are stored encrypted and can be shared across workflows. The platform supports OAuth2, API keys, basic auth, and custom credential types for different services. You can manage credentials centrally and assign them to nodes with full access control.

🤖

AI and Automation Features

n8n has invested heavily in AI capabilities, positioning itself as a platform for building AI agents that you can actually see and control. Every step of an AI agent's reasoning is traceable on the canvas.

AI Agent Nodes

  • LLM Node - Connect to any LLM provider (OpenAI, Anthropic, Google Gemini, local models via Ollama, etc.) and prompt it directly within your workflow.
  • AI Agent Node - Build autonomous agents that can use tools, make decisions, and execute multi-step tasks. Supports tool calling, memory, and multi-agent setups.
  • Vector Store Node - Implement RAG (Retrieval-Augmented Generation) by connecting to vector databases like Pinecone, Qdrant, Weaviate, or Supabase.
  • Text Classifier Node - Use AI to classify text inputs, route workflows based on content, and automate decision-making.
  • Extract Structured Data Node - Extract structured information from unstructured text using AI. Perfect for processing emails, documents, and web content.

MCP Support

n8n has built-in Model Context Protocol (MCP) support. This means n8n can act as an MCP server, exposing your workflows and tools to AI clients like Claude Desktop, Claude Code, and Codex CLI. It can also consume MCP servers, connecting your AI agents to external tools like databases, file systems, and cloud APIs.

Human-in-the-Loop

n8n supports human-in-the-loop approvals to contain AI actions. You can enforce structured inputs and outputs on AI nodes, require manual approval before AI actions execute, and combine rule-based automation with human review gates. This makes n8n suitable for regulated industries and sensitive workflows.

Multi-Model and Multi-Provider

n8n is model-agnostic. You can use multiple cloud and offline AI models in the same workflow, switch providers based on task complexity, and implement cost-optimized AI pipelines. Use a cheap model for simple classification and a premium model for complex reasoning, all within the same workflow.

How to Take Advantage of AI Generate Workflow

One of n8n's most powerful features is the ability to generate entire workflows using nothing but natural language. Instead of spending time dragging and dropping nodes, configuring triggers, and manually wiring connections, you can simply describe what you want and let the AI build it for you. This shifts your role from manual assembler to workflow architect.

How It Works

n8n's AI workflow generation uses an LLM to translate your natural language description into a fully functional workflow graph. You type something like "when a new lead comes in via my website form, enrich it with Clearbit data, add it to Salesforce, and post a notification in Slack" and n8n creates the complete workflow with all the right nodes, connections, and configurations. The AI understands service integrations, data transformations, conditional logic, and error handling.

Best Practices for AI-Generated Workflows

PracticeWhy It Matters
Be specific about servicesName the exact apps (e.g. "Google Sheets" not "a spreadsheet") so the AI selects the right integration nodes
Describe the data flowSpecify what data moves where: "extract the email and name from the webhook payload, then create a contact" helps the AI wire field mappings correctly
Include conditions and branchesIf your workflow has decision points, describe them: "if the score is over 80, send to premium pipeline, otherwise send to nurture"
Specify the triggerTell the AI how the workflow starts: webhook, schedule, email, form submission. This determines the trigger node type
Add error handling requirementsMention what should happen on failure: "if the API call fails, retry twice then send me an email alert"
Iterate from the generated resultAI doesn't always get it perfect. Review the generated workflow, test it, then refine by adjusting nodes or asking the AI to make specific changes

Example Prompts to Try

Here are real-world examples of prompts you can feed into n8n's AI workflow generator:

  • "When a new row is added to my Google Sheet named 'Leads', look up the company domain with Clearbit, enrich the row with the company size and industry, then add the contact to Mailchimp under the 'New Leads' audience."
  • "Listen for GitHub webhooks on my repo. When a new issue is labeled 'bug', create a Linear task with the issue title and body, post the link in our Slack #bugs channel, and assign it to the on-call engineer."
  • "Every weekday at 9 AM, pull the top 5 Hacker News stories, ask GPT to summarize each one in two sentences, save the summaries to a Notion database page, and send me the digest via email."
  • "When a Stripe invoice payment succeeds, generate a PDF receipt using a template, upload it to Google Drive in the 'Invoices' folder, and email the customer a link with a personalized thank-you message."
  • "Monitor my PostgreSQL orders table for new records. If the order total exceeds $500, flag it for manual review in Airtable. If under $500, auto-process it and update the order status."

When to Use AI Generation vs Manual Building

ScenarioBest Approach
Common integration patterns (CRM sync, form to sheet, email alerts)AI generate - these are well-understood by LLMs and come out right most of the time
Complex multi-branch workflows with custom logicAI generate the skeleton, then manually fine-tune the branches and conditions
Workflows using niche or internal APIsBuild manually - the AI may not know the specifics of your custom endpoints
Quick prototypes and experimentsAI generate - speed matters more than perfection at this stage
Production-critical workflows requiring audit trailsAI generate then manually review and harden every node configuration

The real magic happens when you combine both approaches. Use AI to go from zero to a working workflow in seconds, then drop into the visual editor to tweak, add error handling, and optimize. The AI handles the boilerplate, you handle the polish. This dramatically reduces the time from idea to working automation, and makes n8n accessible even to people who don't know which specific integration node connects two services.

🔗

Nodes and Integrations

n8n ships with over 500 built-in integration nodes covering every major category of software. Here are some of the most popular ones organized by category:

CategoryExample Nodes
AI & LLMOpenAI, Anthropic Claude, Google Gemini, Ollama, Hugging Face, Cohere, AI Agent, Vector Stores
CommunicationSlack, Discord, Telegram, Email (SMTP/IMAP), Microsoft Teams, Twilio, WhatsApp
ProductivityGoogle Workspace (Docs, Sheets, Gmail, Calendar, Drive), Microsoft 365, Notion, Asana, Trello, Jira
Database & StoragePostgreSQL, MySQL, MongoDB, Redis, Supabase, Airtable, AWS S3, Google Cloud Storage
CRM & SalesSalesforce, HubSpot, Pipedrive, Zoho CRM, Close, Copper
DevOpsGitHub, GitLab, Bitbucket, Docker, Kubernetes, PagerDuty, Datadog, Grafana
Marketing & AnalyticsMailchimp, SendGrid, Google Analytics, Facebook Ads, LinkedIn Ads, HubSpot Marketing
Payment & FinanceStripe, PayPal, QuickBooks, Xero, FreshBooks, Wise

If a pre-built node doesn't exist for your service, you can use the generic HTTP Request Node to make any API call, combined with expressions to handle authentication, pagination, and response parsing. This effectively gives you unlimited integrations.

💰

Pricing and Licensing

Fair-Code Licensing

n8n uses what they call "fair-code" licensing, published under the Sustainable Use License (SUL). This license allows you to use, modify, and redistribute the software, but restricts use to internal business purposes. It replaced the prior Apache 2.0 + Commons Clause model in March 2022. The key idea is that individuals and businesses can use n8n for free as long as they don't directly compete with n8n's own commercial offerings.

Pricing Tiers

TierPriceBest For
Self-HostedFree (unlimited)Individuals, teams who want full data control
Cloud StarterPaid (per month)Small teams, individual professionals
Cloud ProPaid (per month)Growing teams needing more executions
Cloud EnterpriseCustom pricingLarge organizations with SSO, audit logs, dedicated support

The self-hosted version has no artificial limits -- no user caps, no workflow count limits, no execution throttling. You get all the same nodes and features as the cloud version. This makes n8n an incredible deal for anyone willing to run their own infrastructure.

⚖️

Comparison with Alternatives

Featuren8nZapierMakeActivePieces
Open SourceYes (fair-code)No (proprietary)No (proprietary)Yes (open-source)
Self-HostedFree, unlimitedNot availableNot availableFree, self-hosted
AI Agent SupportBuilt-in, multi-modelLimited AI stepsAI modules availableAI agent nodes
Integrations500+6,000+2,000+300+
Code SupportJavaScript, Python nodesCode step (limited)JavaScript moduleJavaScript, TypeScript
MCP ProtocolNative (server + client)Not availableNot availableNot available
GitHub Stars195,000+N/AN/A11,000+
Sub-workflowsYes, reusableNoScenarios onlyNo
Human-in-the-LoopApprovals, manual inputsLimitedApproval modulesLimited

The main trade-off with n8n is that it has fewer pre-built integrations than Zapier (500 vs 6,000), but it more than makes up for it with the HTTP Request node (which can connect to any REST API) and the ability to self-host for free with no limits. For technical teams who value data control, AI capabilities, and the flexibility of open source, n8n is often the better choice.

🎯

Use Cases

  • IT Operations - Auto-provision user accounts across SaaS tools when a new employee joins. Deactivate accounts on termination. Send notifications to the IT team when servers are down.
  • Security Operations - Enrich security incident tickets with context from threat intelligence feeds. Automate initial triage and alert routing based on severity.
  • DevOps - Convert natural language Slack messages into API calls. Automate deployment pipelines. Monitor application logs and trigger alerts or auto-remediation workflows.
  • Sales Enablement - Generate customer insights from review data. Enrich lead records with public data. Automate follow-up sequences based on prospect behavior.
  • Marketing Automation - Sync leads between platforms. Send personalized email campaigns based on user actions. Aggregate analytics from multiple sources into custom dashboards.
  • AI-Powered Content - Scrape web pages, summarize with AI, and publish to your CMS. Generate social media posts from blog content. Translate and localize content automatically.
  • Data Integration - Sync data between databases and SaaS platforms. Transform and clean data as it moves between systems. Generate reports from distributed data sources.
  • Customer Support - Route tickets based on AI-classified intent. Suggest responses from knowledge bases. Auto-close resolved tickets and send satisfaction surveys.