How to Use n8n: Complete Tutorial 2026
What is n8n and Why Should You Use It?
n8n is an open-source workflow automation tool — think Zapier, but far more powerful, self-hostable, and free when you run it yourself. It lets you connect applications, automate repetitive tasks, and build AI agents without writing code (though you can write code in nodes if you want to).
Why n8n over Zapier? Three reasons. First, it's free when self-hosted — no per-automation charges, no action limits. Second, it handles complex logic that Zapier can't — loops, conditionals, sub-workflows, and custom code. Third, it has exceptional AI integration — native OpenAI, Claude, and Langchain nodes that make building real AI agents straightforward.
In 2026, n8n has become the tool of choice for anyone building serious automations — replacing tools like Make, Activepieces, and even custom Python scripts for many use cases.
How to Install and Set Up n8n
Option 1: Local installation (free, 5 minutes)
Requires Node.js installed on your computer.
```
npx n8n
```
Open http://localhost:5678 in your browser. That's it.
Option 2: Docker (recommended for reliability)
```
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
```
Option 3: Cloud (easiest, costs $20/month)
Sign up at n8n.io and skip the setup entirely. 14-day free trial available.
Option 4: VPS self-hosting (recommended for production)
Rent a $6/month VPS from DigitalOcean or Hetzner, install Docker, run n8n with a reverse proxy (Caddy or Nginx) for HTTPS. This is how most serious users run it.
Building Your First n8n Workflow
Let's build a simple workflow: receive a form submission → send a Slack notification → log to Google Sheets.
Step 1: Open n8n, click 'New Workflow.'
Step 2: Add a Webhook node (Trigger section). Click 'Webhook URL' to copy the endpoint. This is where your form will post data.
Step 3: Add a Slack node. Connect your Slack account, select your channel, and write the message using the data from the webhook: `New submission from {{$json.name}}: {{$json.message}}`
Step 4: Add a Google Sheets node. Connect your Google account, select your spreadsheet, and map the fields from the webhook data to your sheet columns.
Step 5: Connect the nodes in order: Webhook → Slack → Google Sheets.
Step 6: Click 'Activate Workflow.' The automation now runs every time someone submits the form.
You just built an automation that would have required code 3 years ago. Now extend it — add conditions, error handling, additional steps.
Best n8n Tips and Tricks
1. Use the Expression Editor. Click the `{{}}` icon on any field to access n8n's expression language. This lets you transform data — format dates, extract specific fields, combine strings, run basic math.
2. Test nodes individually. Right-click any node and select 'Execute Node' to test it with real data without running the entire workflow. This is the fastest way to debug.
3. Use HTTP Request nodes for everything. If an app doesn't have a native n8n node, the HTTP Request node connects to any REST API. 90% of modern apps have APIs.
4. Save sub-workflows. Build reusable component workflows (like 'send formatted Slack notification') and call them from other workflows using the Execute Workflow node.
5. Handle errors explicitly. Add Error Trigger nodes and route failures to a Slack channel or email. Don't wait to discover that your automation broke a week ago.
n8n vs Zapier vs Make: Which Should You Use?
| Feature | n8n | Zapier | Make |
|---------|-----|--------|------|
| Free tier | ✅ Self-hosted | 🟡 Limited | 🟡 Limited |
| Integrations | 400+ | 6,000+ | 1,000+ |
| Code nodes | ✅ JavaScript | ❌ No | 🟡 Limited |
| AI agents | ✅ Native | 🟡 Basic | 🟡 Basic |
| Self-hosting | ✅ Yes | ❌ No | ❌ No |
| Learning curve | Medium | Easy | Medium |
Use n8n if: you want maximum power, need AI agent capabilities, or want to avoid per-action pricing.
Use Zapier if: you need the widest integration library and want the simplest possible setup.
Use Make if: you're between Zapier and n8n in terms of complexity needs.
Building AI Agents with n8n
n8n's AI Agent node lets you build autonomous agents that can reason, use tools, and complete multi-step tasks without manual intervention. Here's a simple AI email assistant:
Step 1: Trigger: Gmail node watches for new emails matching a filter (e.g., from @support.com)
Step 2: AI Agent node: System prompt: 'You are a customer support agent for [Company]. Categorize this email as: billing, technical, feature request, or complaint. Draft a response.' Connect it to an OpenAI or Claude credential.
Step 3: Tool nodes: Give the agent access to a knowledge base (vector store), a CRM lookup, and a draft email tool.
Step 4: Output: Route based on category, create a ticket in your helpdesk, send the draft for human review.
This is a real AI agent — it reads, reasons, looks up information, and drafts a response, all without human input. Build from this foundation.
Frequently Asked Questions
Is n8n really free?
n8n is free when self-hosted. You pay for your own server (as little as $5–6/month on DigitalOcean or Hetzner). The n8n cloud plan starts at $20/month if you want fully managed hosting.
Do I need to code to use n8n?
No — n8n has a visual drag-and-drop interface that requires no coding. The Code node lets you write JavaScript for advanced transformations, but it's optional.
How does n8n compare to Zapier?
n8n is more powerful and cheaper (free when self-hosted) but has fewer integrations (400+ vs Zapier's 6,000+). n8n is better for complex automations and AI agents; Zapier is better for simple app-to-app connections.
What can I build with n8n?
Email automation, social media scheduling, lead qualification bots, customer support triaging, data synchronization, report generation, AI agents, web scraping pipelines, and almost anything else involving connecting apps or processing data.
How long does it take to learn n8n?
You can build a simple automation in 30 minutes. Becoming proficient takes 10–20 hours of practice. Building production AI agents is an advanced skill requiring 40+ hours of deliberate learning.