n8n is the most powerful free workflow automation tool available — and it's the backbone of most serious AI automation businesses. If you've heard about it but found the learning curve intimidating, this guide will get you from zero to running real automations in a single session.
What Is n8n and Why Does It Matter?
n8n (pronounced "n-eight-n") is an open-source workflow automation platform that connects apps, services, and AI models together. Think of it as a visual programming environment where you connect blocks — each block being an action, a trigger, or a data transformation — to build automated workflows.
The difference between n8n and tools like Zapier or Make:
- n8n is open-source and self-hostable: Run it on your own VPS for free, forever. Zapier charges $20-50+/month for equivalent functionality.
- n8n has no operation limits: Zapier and Make count every action. n8n self-hosted has unlimited operations.
- n8n has native AI integration: Built-in nodes for OpenAI, Anthropic, and any OpenAI-compatible endpoint (including OpenRouter).
- n8n supports complex logic: Conditional routing, loops, error handling, sub-workflows — things that require expensive tiers on other tools.
In the AI automation community, n8n consistently ranks as the most-used tool across all income methods. It's not just popular — it's genuinely essential infrastructure for anyone running AI-powered business operations.
Installing n8n: Two Options
Option A: Self-Hosted on VPS (Recommended)
The best approach for anyone serious about automation. Free, unlimited, fully controlled.
Requirements: A VPS (Hostinger KVM2 at $8.99/month works well), Ubuntu 20.04+, 1GB+ RAM.
Install Node.js and n8n:
# Install Node.js 20.x
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install nodejs -y
# Install n8n globally
npm install -g n8n
# Start n8n
n8n start
n8n will be available at http://your-server-ip:5678
For persistent operation, create a systemd service:
cat > /etc/systemd/system/n8n.service << 'EOF'
[Unit]
Description=n8n
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/n8n start
Restart=always
RestartSec=10
Environment=N8N_PORT=5678
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable n8n
systemctl start n8n
Option B: n8n Cloud (Paid, Easier)
If you don't want to manage a server, n8n Cloud starts at $20/month and includes hosting, updates, and support. The interface is identical to self-hosted. Good for beginners who want to test before committing to self-hosting.
Understanding n8n's Core Concepts
Workflows
A workflow is a series of connected nodes that execute in sequence. When triggered, n8n runs through each node in order, passing data from one to the next.
Example simple workflow:
- Trigger: New email arrives in Gmail
- AI Node: Classify the email (urgent/normal/spam)
- Conditional: If urgent → send Slack alert; if normal → add to Notion task list
Nodes
Every block in n8n is a "node." There are three types:
Trigger nodes: Start the workflow. Examples: Schedule trigger (runs at a specific time), Webhook trigger (runs when an HTTP request arrives), Gmail trigger (runs when new email arrives).
Regular nodes: Do something and pass data forward. Examples: HTTP Request, Gmail, Google Sheets, Slack, AI Agent, OpenAI, etc.
Logic nodes: Control workflow flow. Examples: IF (conditional branching), Switch (multiple branches), Merge (combine data streams), Loop (repeat for each item).
Data
n8n passes data between nodes as JSON objects. You can reference data from previous nodes using expressions like {{ $json.email }} or {{ $node["NodeName"].json.field }}.
Building Your First Workflow
Let's build a real, useful workflow: a daily AI news briefing delivered to Telegram.
Step 1: Create a New Workflow
In the n8n interface, click "New Workflow." Give it a name: "Daily AI News Briefing."
Step 2: Add a Schedule Trigger
Click the "+" button to add a node. Search for "Schedule." Select "Schedule Trigger."
Configure:
- Trigger interval: Days
- Days: 1
- Hour: 8 (8 AM)
- Minute: 0
This triggers the workflow every morning at 8 AM.
Step 3: Add an HTTP Request Node
This fetches AI news from a news API. Add an "HTTP Request" node.
Configure:
- URL:
https://newsapi.org/v2/everything?q=artificial+intelligence&sortBy=publishedAt&pageSize=10&apiKey=YOUR_API_KEY - Method: GET
(Get a free NewsAPI key at newsapi.org — 100 requests/day free.)
Step 4: Add an OpenAI/AI Node
Add an "OpenAI" node (or if using OpenRouter, an HTTP Request to the OpenRouter API).
Configure:
- Model: gpt-4o-mini (fast and cheap)
- Prompt:
You are a news analyst. Summarize these AI news headlines into a concise, engaging 5-point briefing for an AI professional. Format as a Telegram message with emoji. Headlines: {{ JSON.stringify($json.articles.map(a => a.title + ': ' + a.description)) }}
Step 5: Add a Telegram Node
Add a "Telegram" node.
Configure:
- Credential: Add your Telegram bot token
- Chat ID: Your Telegram user ID
- Text:
{{ $json.message.content }}
Step 6: Test and Activate
Click "Execute Workflow" to test it manually. If it works (you get a Telegram message with the news summary), click "Activate" to turn on the schedule.
Congratulations — you have an automated AI news briefing running every morning.
Essential Nodes to Learn
AI Agent Node
The most powerful node in n8n. The AI Agent node can:
- Have a system prompt defining its role and behavior
- Access tools (web search, calculators, code execution)
- Maintain conversation memory within a workflow run
- Route to different outputs based on AI decisions
Use this for: intelligent email routing, content classification, customer inquiry handling, research automation.
HTTP Request Node
Connects n8n to any API. If there's no dedicated n8n node for a service, the HTTP Request node handles it. Use for: OpenRouter API calls, custom webhooks, any API not in n8n's native integrations.
Code Node
Runs JavaScript or Python within your workflow. Use for: complex data transformations, calculations, string manipulation, anything the built-in nodes can't handle.
Google Sheets Node
Read from and write to Google Sheets. Useful for: logging automation results, reading client data, updating dashboards, maintaining simple databases.
Gmail/Email Nodes
Send and receive emails. Use for: automated email responses, lead notifications, daily report delivery, client communication automation.
Real Workflows That Make Money
Workflow 1: AI Email Assistant
Trigger: New email in Gmail Filter: Ignore newsletters/promotions AI Node: Classify email type and draft response Human Review: Send draft to Telegram for approval Send: On approval, send the drafted email
Value: Saves 1-2 hours/day of email management. Charge clients $500-800/month.
Workflow 2: Social Media Content Machine
Trigger: Daily at 9 AM Research: Fetch trending topics in niche via news API AI Writer: Generate 5 social media posts (Twitter, LinkedIn, Instagram captions) Review: Send to Telegram for approval Schedule: Approved posts scheduled via Buffer API
Value: Consistent social media presence with minimal daily time investment.
Workflow 3: Lead Qualification Pipeline
Trigger: New form submission (webhook) AI Qualifier: Analyze lead data against ideal customer profile Score: Assign 1-10 qualification score Route: High score → immediate Slack notification; Low score → add to nurture sequence in email tool Log: All leads logged to Google Sheets with scores
Value: No high-value lead gets missed. Charge clients $800-1,200/month.
Workflow 4: Competitive Intelligence Monitor
Trigger: Daily at 7 AM Scrape: Fetch competitor website updates (via HTTP Request or Browserless API) Compare: AI identifies new content, pricing changes, feature updates Report: Format changes as a Telegram message or email digest Archive: Log all changes to Google Sheets
Value: Continuous competitive awareness. Sell as $800-2,000/month service.
Connecting n8n to Hermes Agent
n8n and Hermes work powerfully in combination. n8n handles the orchestration and triggering; Hermes handles the AI reasoning with persistent memory.
The connection: expose Hermes's API endpoint and call it from n8n's HTTP Request node.
{
"method": "POST",
"url": "http://your-hermes-server:8080/api/message",
"body": {
"message": "{{ $json.task_description }}",
"context": "{{ $json.context }}"
}
}
This lets you trigger Hermes from any n8n workflow — when a new email arrives, when a form is submitted, when a scheduled task fires — while Hermes handles the complex AI reasoning with your full memory context.
Common Mistakes to Avoid
Not setting up error handling: Add error trigger nodes that notify you via Telegram when workflows fail. Silent failures are the enemy of reliable automation.
Over-engineering the first workflow: Build something simple that works. You can always add complexity. Many beginners try to build a 20-node monster workflow before they understand the basics.
Ignoring rate limits: APIs have rate limits. If your workflow calls an API too frequently, it will fail. Add wait nodes or check the API's rate limit documentation.
Not using credentials properly: Store all API keys as n8n credentials, not hardcoded in workflow nodes. Credentials are encrypted; hardcoded values are exposed in workflow exports.
Forgetting to test edge cases: What happens if the AI returns an unexpected format? If the news API returns no results? Build defensive workflows that handle empty or malformed data gracefully.
Resources to Go Deeper
- n8n documentation: docs.n8n.io — comprehensive, well-maintained
- n8n community forum: community.n8n.io — active community, most questions already answered
- n8n workflow templates: n8n.io/workflows — hundreds of pre-built workflows to learn from and customize
- YouTube: Search "n8n tutorial 2026" for video walkthroughs of specific use cases
The investment in learning n8n pays dividends for years. Every automation skill you build compounds — the same workflow patterns appear across different clients and use cases, and your delivery speed increases dramatically with experience.
Published on ai.quantummerlin.com — Your source for practical AI agent intelligence