n8n (pronounced "n-eight-n" or "nodemation") is an open-source workflow automation tool that lets you connect apps and automate tasks visually โ without writing code. Think Zapier or Make.com, but with far more power, full self-hosting support, and a permanently free tier when you run it yourself. Over 400 native integrations, AI/LLM nodes built-in, and a thriving community of workflow templates.
If you've been intimidated by automation tools before, n8n is genuinely approachable. Most people build their first working workflow within 30 minutes. By the end of this guide, you'll have a real automation running โ not just a theoretical understanding.
What Is n8n?
n8n is a workflow automation platform where you connect "nodes" โ each node represents an app, service, or logic operation โ to build automated processes called workflows. A workflow runs when a trigger fires (a new email, a form submission, a schedule) and passes data through a chain of nodes, each transforming or acting on that data.
400+ Integrations
Native nodes for Gmail, Slack, Notion, Airtable, Google Sheets, OpenAI, Stripe, and hundreds more.
Built-in AI Nodes
Native OpenAI, Anthropic, and AI Agent nodes โ build LLM-powered workflows without any coding.
Free & Self-Hosted
Unlimited workflows and executions when self-hosted. Free cloud tier for getting started quickly.
n8n vs Make.com vs Zapier
| Feature | n8n | Make.com | Zapier |
|---|---|---|---|
| Price (self-hosted) | โ Free forever | โ Cloud only | โ Cloud only |
| Cloud free tier | โ ๏ธ 5 workflows, 2,500 exec/month | โ 1,000 ops/month | โ ๏ธ 100 tasks/month |
| Integrations | 400+ native | 1,500+ native | 6,000+ native |
| Visual builder | โ Canvas-based | โ Canvas-based | โ Linear flow |
| Code nodes (JS/Python) | โ Native | โ ๏ธ Limited | โ ๏ธ Paid only |
| AI/LLM nodes | โ Native (best-in-class) | โ OpenAI module | โ ChatGPT action |
| Learning curve | Medium | Low-Medium | Very Low |
| Best for | Power users, developers, AI workflows | Business users, complex automations | Quick setup, widest app support |
Installation: Two Ways to Get Started
Option A: n8n Cloud (Easiest โ 2 minutes)
Sign up at n8n.io for a free cloud account. You get a hosted instance immediately with no setup. The free tier includes 5 active workflows and 2,500 executions/month โ plenty for learning and light personal use. When you're ready to scale or need unlimited executions, consider self-hosting.
Option B: Self-Host with npx (Recommended โ 5 minutes)
The easiest self-hosted path requires only Node.js installed on your computer:
# Run n8n locally (data persists in ~/.n8n by default)
npx n8n
# Then open: http://localhost:5678
That's it โ n8n is now running locally. Your workflows and data persist between sessions. This is perfect for development and personal use. For a production self-hosted setup (always-on, accessible from anywhere), run it on a $5-6/month VPS using Docker:
# Install Docker, then run:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Add --restart unless-stopped to the docker command to ensure n8n restarts automatically after a server reboot. For a full production setup with SSL, use nginx as a reverse proxy with Let's Encrypt for HTTPS โ n8n's hosting documentation covers this in detail.
Interface Tour
Once n8n is running, you'll see the dashboard. Key areas:
- Workflows list: All your saved workflows. Click any to open it in the canvas editor.
- Canvas editor: The main workspace where you build workflows by adding and connecting nodes. Pan by dragging, zoom with scroll wheel.
- Node panel: Click the + button on any connection or press
Tabto open the node search. Type to filter by name or function. - Node settings: Click any node to open its configuration panel on the right side. This is where you configure what the node does.
- Execution log: At the bottom โ shows the data flowing through each node. Click any node after a test run to see its input and output data.
- Credentials manager: Settings โ Credentials โ where you store API keys and OAuth connections once, referenced by name in workflows.
Core Concepts
Triggers
Every workflow starts with a trigger node โ the event that kicks off the automation. Common triggers:
- Schedule Trigger: Run at a specific time or interval (every hour, daily at 9 AM, etc.)
- Webhook Trigger: Fires when an HTTP POST/GET request hits a URL n8n provides
- Gmail / Email Trigger: Fires when a new email matching criteria arrives
- Manual Trigger: Runs when you click the play button โ perfect for on-demand workflows and testing
- App-specific triggers: New Notion page, new Google Sheet row, new Slack message, etc.
Nodes
Each node in the workflow performs one operation: calling an API, transforming data, sending a notification, or executing code. Nodes pass data to the next node as JSON objects. You can click a node after running to see exactly what data it received and produced โ invaluable for debugging.
Key node types to know first:
- HTTP Request: Call any REST API that doesn't have a native n8n node
- Code: Write custom JavaScript or Python for any logic not covered by built-in nodes
- If: Branch the workflow based on conditions
- Merge: Combine data from multiple branches
- Set: Create or modify fields in the data flowing through
- Split in Batches: Process large arrays of items in smaller chunks
Expressions
Expressions let you reference data from earlier nodes in your workflow. They use the ={{ }} syntax and appear wherever you can enter dynamic values:
// Reference a field from the previous node:
={{ $json.email }}
// Reference a field from a specific named node:
={{ $('Gmail Trigger').first().json.subject }}
// JavaScript expressions work too:
={{ $json.name.toLowerCase() }}
={{ new Date().toISOString() }}
={{ $json.items.length }}
Expressions are where n8n's real power emerges. Once you're comfortable with the $json and $('NodeName') syntax, you can build surprisingly complex logic without writing full Code nodes.
Credentials
Credentials store your API keys, OAuth tokens, and passwords securely in n8n. You create them once in Settings โ Credentials, then select them by name in any node that needs them. Credentials are encrypted at rest and never exposed in workflow exports โ making it safe to share workflow templates without exposing your keys.
Your First Workflow: Daily Hacker News Digest
Let's build a real workflow: every morning at 8 AM, fetch the top 5 Hacker News stories and email them to you. This uses Schedule Trigger, HTTP Request, Code, and Gmail nodes.
โฐ Add a Schedule Trigger
Click + in the canvas. Search "Schedule Trigger." Set: Trigger at โ Every Day, Time โ 08:00 AM. This node has no input โ it fires automatically each day and passes a timestamp to the next node.
๐ Add an HTTP Request Node
Click the + after Schedule Trigger. Search "HTTP Request." Set Method: GET, URL: https://hacker-news.firebaseio.com/v0/topstories.json. Click Execute Node to test โ you'll see an array of story IDs returned.
๐ง Add a Code Node โ Get Top 5 Stories
Add a Code node. This fetches the details for the first 5 story IDs and returns them as structured objects.
// Get top 5 story IDs from the HTTP Request output
const storyIds = $input.first().json.slice(0, 5);
// Fetch each story's details
const stories = await Promise.all(
storyIds.map(async (id) => {
const res = await $helpers.httpRequest({
method: 'GET',
url: `https://hacker-news.firebaseio.com/v0/item/${id}.json`
});
return {
title: res.title,
url: res.url || `https://news.ycombinator.com/item?id=${res.id}`,
score: res.score,
comments: res.descendants || 0
};
})
);
return [{ json: { stories } }];
๐ง Add a Gmail Node โ Send Digest Email
Add Gmail node. Connect your Google account via OAuth2. Set: Operation โ Send Email, To โ your email, Subject โ "โ Top 5 HN Stories โ {{new Date().toLocaleDateString()}}", Email Type โ HTML.
// In the Gmail HTML Body field, use an expression:
// First, add a Code node BEFORE Gmail to build the HTML:
const stories = $input.first().json.stories;
const html = `
<h2>โ Top 5 Hacker News Stories Today</h2>
${stories.map((s, i) => `
<div style="margin-bottom:20px;padding:15px;border-left:3px solid #667eea;">
<strong>${i + 1}. <a href="${s.url}">${s.title}</a></strong>
<br><small style="color:#888;">โฒ ${s.score} points ยท ๐ฌ ${s.comments} comments</small>
</div>
`).join('')}
`;
return [{ json: { html } }];
โ Activate the Workflow
Click "Test workflow" to run it manually and verify you receive the email. Once confirmed, toggle the Activate switch in the top-right corner. The workflow will now run automatically every morning at 8 AM without any further action from you.
Congratulations โ you just built and deployed your first real n8n automation! This same pattern (fetch โ process โ notify) is the backbone of dozens of practical workflows you can build next.
Common Troubleshooting
- "Node X returned an error": Click the red node to see the exact error message. Most are API authentication failures (check your credentials) or incorrect field names (check the node's input data tab to see what fields are actually available).
- Expressions returning undefined: Open the Expression editor (the code icon next to any input field) โ it shows a live preview of what the expression evaluates to with real data. Check the field path carefully.
- Workflow not triggering on schedule: Ensure the workflow is Activated (toggle in top-right). Also check that your n8n instance is running and accessible โ a sleeping VPS won't trigger scheduled workflows.
- Google OAuth not working: You need to create a Google Cloud project, enable the relevant APIs (Drive, Gmail, Sheets), and create OAuth2 credentials. n8n's Google credential setup guide covers this step by step.
Frequently Asked Questions
={{ }}) requires some familiarity with basic concepts like object property access and string operations, but it's easy to pick up and n8n's expression editor provides live feedback as you type.