n8n

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

178Kstars
55.5Kforks
Other
TypeScript

n8n is a fair-code workflow automation platform that gives technical teams the flexibility of custom code with the speed of a visual no-code builder. Rather than forcing a choice between drag-and-drop simplicity and full programming control, n8n lets you mix both in the same workflow — writing JavaScript or Python in code nodes, then connecting to 400+ pre-built integrations without writing a line of authentication boilerplate.

Built as a TypeScript monorepo and deployable via npm, Docker, or Kubernetes, n8n is designed from the ground up for self-hosted operation. It supports Git-based workflow versioning, encrypted credential storage, SAML/SSO and LDAP authentication, role-based access control, and air-gapped deployments for teams that need to keep automation logic and data entirely on-premises.

Native AI capabilities are a first-class feature, not an afterthought. n8n integrates LangChain directly into its workflow engine, enabling multi-step AI agent pipelines with custom models, human-in-the-loop approval steps, evaluation nodes, and guardrails. It also implements the Model Context Protocol (MCP) on both sides — workflows can consume MCP tool registries and expose themselves as MCP servers callable by AI agents.

With over 900 community-contributed workflow templates, a task runner that executes untrusted code in isolated subprocesses, and an active contributor base shipping multiple releases per week, n8n sits at the intersection of integration platform, AI orchestration layer, and internal automation framework.

What You Get

  • Visual Workflow Canvas - Drag-and-drop workflow editor with real-time input/output previews at every node, letting you inspect data transformations step by step without running the full workflow.
  • Code Nodes (JavaScript & Python) - Embed arbitrary JavaScript or Python directly in workflows with npm package support, executing in an isolated task-runner subprocess so user code never runs inside the main n8n process.
  • 400+ Pre-Built Integration Nodes - Native nodes for Salesforce, Slack, ServiceNow, GitHub, Airtable, Asana, Postgres, MySQL, and hundreds more, with OAuth and API key authentication handled automatically.
  • Native AI Agent Workflows - Build multi-step LangChain-powered AI agent pipelines with tool use, human-in-the-loop approval steps, memory, guardrails, and evaluation nodes for measuring model performance.
  • MCP Client and Server - Consume external MCP tool registries as workflow inputs and expose your own workflows as MCP-compatible tool endpoints callable by any AI agent or LLM platform.
  • Git-Based Version Control - Push and pull workflow definitions to Git repositories, enabling branching, code review, and rollback of automation logic using familiar developer workflows.
  • Enterprise Security - SAML/SSO, LDAP, RBAC with granular scopes, encrypted secret storage, SIEM log streaming, audit logs, and full support for air-gapped deployments.
  • 900+ Community Templates - A library of ready-to-use workflow templates contributed by the community, covering everything from CRM sync to AI content pipelines, importable in one click.

Common Use Cases

  • Security incident response automation - SecOps teams route SIEM alerts into n8n, enrich them with threat intelligence APIs, create ServiceNow tickets, notify Slack channels, and trigger AI-based triage analysis in a single workflow.
  • AI-powered sales intelligence - Sales teams pull customer reviews from G2 or Amazon into an LLM node, generate structured summaries, score sentiment, and automatically create follow-up tasks in Salesforce CRM.
  • DevOps deployment pipelines - Engineering teams trigger post-deploy smoke tests via webhook, run custom validation code in Python nodes, notify teams of failures, and initiate rollback sequences — all without a dedicated CI/CD tool.
  • Employee onboarding at scale - IT teams connect HRIS events to n8n, auto-provision accounts in Slack, Notion, Google Workspace, and ticketing systems, assign training modules, and schedule manager check-ins without manual steps.
  • Data synchronization between SaaS tools - Operations teams keep CRM, support, and project management data in sync by running scheduled workflows that query APIs, transform records, and upsert data across systems.
  • Internal AI agent backends - Product teams expose n8n workflows as MCP tool servers, allowing LLM-based agents to query internal databases, trigger business processes, and return structured results without building custom APIs.

Under The Hood

Architecture n8n is organized as a pnpm monorepo managed by Turbo, with clearly bounded packages enforcing strict separation of concerns: the workflow package contains the pure data model and sandboxed expression engine, core houses the execution engine and node execution contexts, cli implements the REST API layer and orchestrates persistence and scheduling, nodes-base delivers over 300 integration nodes behind a standardized interface, and the frontend packages implement the Vue 3 canvas editor. The execution model is event-driven and item-based — triggers produce arrays of items that flow through each node in a directed graph, with the engine handling branching, merging, and error routing. Enterprise features are gated behind .ee.-namespaced directories and files that require a valid Enterprise License key at runtime, making the commercial boundary explicit and auditable in the source tree itself.

Tech Stack The backend runs on Node.js 22+ with TypeScript strict mode throughout. Express serves the REST API with decorators used for route registration, and TypeORM provides database access against PostgreSQL, MySQL, or SQLite. User code in Code nodes executes in a separate task-runner subprocess using isolated-vm to prevent access to the host process. The Vue 3 frontend uses CodeMirror 6 for the expression and code editors and Pinia for state management. LangChain integrates natively for AI agent workflows, with support for OpenAI, Anthropic, and other model providers. CI/CD runs on GitHub Actions with Jest for backend unit tests, Vitest for frontend unit tests, TestContainers for database integration tests, and Playwright for end-to-end browser tests including a dedicated MCP test suite.

Code Quality The repository contains over 4,100 test files spanning unit, integration, and end-to-end coverage. TypeScript strict mode is enforced across all packages, with typed error classes, explicit HTTP status handling in controllers, and strong contracts on node parameters and execution contexts. Biome handles formatting and a per-package ESLint configuration handles linting, both enforced in CI. The __tests__ directory convention is applied consistently across packages. Enterprise-gated files use .ee. naming so the commercial boundary is discoverable from the filesystem. Test isolation is thorough — integration tests spin up real database instances via TestContainers rather than relying on mocks.

What Makes It Unique n8n occupies a distinctive position by combining three capabilities rarely found together: full source access under a fair-code license that permits internal self-hosting without paying, a task runner that safely executes arbitrary user JavaScript and Python in isolated subprocesses, and first-class MCP support that lets workflows function as callable AI tool endpoints. The AI workflow builder uses an agentic loop to generate complete workflow graphs from natural language prompts, lowering the barrier for non-developers while keeping the underlying representation fully editable. This combination — visual builder, code execution, AI orchestration, and MCP interoperability — is what separates n8n from both traditional iPaaS platforms and purpose-built AI orchestration tools.

Self-Hosting

n8n is distributed under the Sustainable Use License (SUL) for most of its source code, with Enterprise-only features (identified by .ee. in their filename or directory path) covered by a separate n8n Enterprise License. The Sustainable Use License is not an OSI-approved open source license: it grants you the right to use, modify, and self-host the software for your own internal business purposes or for non-commercial use, but you may not resell the software or offer it to others as a commercial service. This means a company can run n8n internally without paying, but building a product on top of n8n and selling it to customers requires a commercial agreement. For teams evaluating self-hosted automation, this is a meaningful distinction from truly open source tools — the source is readable and forkable, but redistribution rights are limited.

Running n8n yourself is operationally straightforward at small scale — a single Docker container with a mounted data volume handles development and small team deployments. At production scale, you take on responsibility for database management (PostgreSQL or MySQL are recommended over the default SQLite), secret key rotation for encrypted credential storage, upgrades (released multiple times per week), horizontal scaling via queue-mode workers and a dedicated webhook process, and monitoring. n8n’s own health endpoints and structured logging help, but high-availability setups require external load balancers, shared Redis for the job queue, and careful handling of the encryption key — lose it and your stored credentials are unrecoverable.

The n8n Cloud managed offering removes all of this operational burden: infrastructure, upgrades, backups, and high availability are handled for you, and the cloud tier unlocks additional Enterprise features like SSO/SAML, LDAP, advanced RBAC with custom roles, Git-based source control integration, log streaming, and the AI workflow builder. Self-hosters on the Community plan can access the core engine and all non-.ee. nodes indefinitely, but advanced security and compliance features require an Enterprise license obtained via license@n8n.io. For teams with strict data residency requirements or air-gap mandates, self-hosting remains the only viable path — but those teams should budget for the engineering time required to operate it reliably.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search