What is n8n?
n8n (pronounced “n-eight-n”) is an open-source workflow automation platform that lets you connect apps, APIs, and services together — automating repetitive tasks without writing much code.
Think of it as a visual programming tool where you drag and drop nodes to build automated workflows.
The Core Idea
Instead of manually copying data between apps or writing custom scripts, n8n lets you build visual pipelines:
For example:

New email arrives in Gmail ↓Extract key info with AI ↓Create a task in Notion ↓Send Slack notification
All without writing a single line of code.
Key Concepts
1. Nodes
Every action in n8n is a node — a building block that does one job.
| Node Type | What it does |
|---|---|
| Trigger node | Starts the workflow (webhook, schedule, event) |
| Action node | Performs an action (send email, create record) |
| Logic node | Controls flow (if/else, loops, merge) |
| AI node | Calls an LLM, agent, or AI tool |
| Code node | Run custom JavaScript or Python |
2. Workflows
A workflow is a connected sequence of nodes — your automation blueprint.
3. Triggers
Every workflow starts with a trigger:
- Webhook — fires when an API call is received
- Schedule — runs at set times (like a cron job)
- App event — fires when something happens in Gmail, Slack, etc.
- Manual — you click “Run” yourself
4. Credentials
Securely stored API keys and OAuth tokens for connecting to external services.
How n8n Works — Step by Step
┌──────────────────────────────────────────────────┐│ TRIGGER ││ "Every day at 9am" / "New Typeform response" ││ "Webhook received" / "File added to Drive" │└─────────────────────┬────────────────────────────┘ ↓┌──────────────────────────────────────────────────┐│ FETCH / INPUT DATA ││ Pull data from source (API, DB, spreadsheet) │└─────────────────────┬────────────────────────────┘ ↓┌──────────────────────────────────────────────────┐│ PROCESS / TRANSFORM ││ Filter, map, merge, format the data ││ Run AI analysis, call an LLM, classify text │└─────────────────────┬────────────────────────────┘ ↓┌──────────────────────────────────────────────────┐│ LOGIC / BRANCHING ││ IF condition → path A ││ ELSE → path B │└──────────┬──────────────────────┬───────────────┘ ↓ ↓ ┌─────────────┐ ┌─────────────┐ │ Action A │ │ Action B │ │ Create task │ │ Send alert │ └─────────────┘ └─────────────┘ ↓┌──────────────────────────────────────────────────┐│ OUTPUT / NOTIFY ││ Write to DB, send email, post to Slack, etc. │└──────────────────────────────────────────────────┘
n8n vs Other Tools
| Feature | n8n | Zapier | Make (Integromat) |
|---|---|---|---|
| Open source | ✅ Yes | ❌ No | ❌ No |
| Self-hostable | ✅ Yes | ❌ No | ❌ No |
| AI/LLM nodes | ✅ Built-in | Limited | Limited |
| Code nodes | ✅ JS + Python | ❌ | Limited |
| Pricing | Free self-host | Paid | Paid |
| Complexity | Medium-High | Low | Medium |
| Custom logic | ✅ Full control | Limited | Limited |
n8n + AI — The Killer Feature
n8n has deep AI integration, making it powerful for building AI-powered automations:
Customer sends support email ↓n8n receives via Gmail trigger ↓AI node (Claude/GPT) classifies issue: → Billing? → Route to finance team → Bug? → Create GitHub issue → General? → Auto-reply with answer ↓Log everything to Google Sheets
Built-in AI capabilities include connecting to Claude, GPT, Gemini, running LangChain agents, calling Hugging Face models, and vector store operations for RAG.
Real-World Use Cases
| Use Case | Workflow |
|---|---|
| Lead management | Form submit → enrich with AI → add to CRM → notify sales on Slack |
| Content pipeline | RSS feed → AI summarize → post to LinkedIn + Twitter |
| Invoice processing | Email attachment → extract data with AI → update accounting system |
| Support automation | Ticket created → AI classify & draft reply → human reviews |
| Data sync | Every hour → fetch from API → clean data → update database |
| Monitoring | Every 5 min → check server status → alert on Slack if down |
Self-Hosted vs Cloud
Self-Hosted (Free)
# Run with Dockerdocker run -it --rm \ -p 5678:5678 \ -v ~/.n8n:/home/node/.n8n \ n8nio/n8n
- Full control over your data
- No usage limits
- You manage the infrastructure
n8n Cloud (Paid)
- Managed hosting by n8n team
- No setup required
- Starts at ~$20/month
n8n vs LangChain / LangGraph
| n8n | LangChain / LangGraph | |
|---|---|---|
| Primary use | Business workflow automation | AI agent development |
| Audience | No-code / low-code users | Developers |
| Interface | Visual drag-and-drop | Code (Python) |
| AI focus | AI as one tool among many | AI is the core |
| Best for | Connecting business apps with AI | Building complex AI agents |
They complement each other — you can call a LangChain agent from n8n as part of a larger business workflow.
Key Takeaway
n8n is the automation glue of the modern tech stack — it connects your apps, APIs, databases, and AI models into seamless automated workflows, giving you the power of tools like Zapier but with full open-source flexibility, self-hosting, and deep AI integration.