What is n8n?
n8n (pronounced "n-eight-n") is an open-source workflow automation tool that lets you connect apps, automate repetitive tasks, and build AI-powered pipelines โ all without writing a single line of code. Think of it as a Zapier alternative that you can host yourself, customize fully, and use for free.
As of 2026, n8n has over 400 native integrations: OpenAI, Telegram, Google Sheets, HubSpot, Slack, Notion, Stripe, Twilio, and hundreds more. It also has a built-in Code node for JavaScript when you need something custom.
Why n8n over Zapier or Make.com? Three main reasons: it's open-source and self-hostable (free), it has no execution limits on self-hosted plans, and it handles complex branching logic and AI agent orchestration that simpler tools can't match.
How to Install n8n (3 methods)
Method 1: n8n Cloud (easiest, paid)
Go to n8n.io and sign up for a cloud account. Free trial available. Best if you want to start immediately without any server setup. Paid plans from $20/month.
Method 2: Docker (recommended for self-hosting)
If you have Docker installed, run n8n locally with a single command:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
docker.n8n.io/n8nio/n8nThen open http://localhost:5678 in your browser. Your workflows are saved in ~/.n8n.
Method 3: VPS server (production)
For a production setup, rent a $5โ$10/month VPS (DigitalOcean, Hetzner, or Vultr), install Docker, and run n8n with a domain and SSL. This gives you a permanent, always-on automation server.
n8n Interface: Key Concepts
Nodes
Every action in n8n is a node. There are three types:
- Trigger nodes โ start a workflow (Webhook, Schedule, Gmail, Telegram)
- Action nodes โ do something (HTTP Request, OpenAI, Google Sheets, Send Email)
- Logic nodes โ control flow (IF, Switch, Merge, Loop)
Workflows
A workflow is a chain of nodes connected by edges. Data flows from left to right, passing through each node as JSON objects. Each node receives items, processes them, and passes results to the next node.
Expressions
You can reference data from previous nodes using expressions: {{$json.email}} or{{$node["HTTP Request"].json.result}}. This makes workflows dynamic without code.
Your First n8n Workflow: Telegram Bot in 10 Minutes
Let's build something real: a Telegram bot that receives a message and replies with a ChatGPT response.
Step 1: Create a Telegram Bot
Open Telegram and message @BotFather. Send /newbot, follow the prompts, and copy your bot token.
Step 2: Add Telegram Trigger in n8n
In n8n, click + Add node, search for "Telegram Trigger", and select it. Configure it with your bot token and set the trigger to "Message".
Step 3: Add OpenAI Node
Add an OpenAI node after the trigger. Set operation to "Message a Model", model to "gpt-4o-mini", and for the prompt use an expression:{{$json.message.text}}
Step 4: Reply via Telegram
Add a Telegram action node. Set operation to "Send Message", chat ID to {{$("Telegram Trigger").item.json.message.chat.id}}, and text to {{$json.choices[0].message.content}}.
Step 5: Activate and Test
Click Activate in the top right. Send your bot a message on Telegram. Within 1โ2 seconds, it should reply with a GPT-4o-mini response. Congratulations โ you just built an AI bot!
5 Most Useful n8n Workflow Patterns
1. Lead Capture โ CRM โ Notification
Trigger: Webhook from contact form โ Action: Create/update contact in HubSpot โ Action: Send Slack or Telegram notification to sales team. This alone saves 2โ3 hours per week for most businesses.
2. Scheduled AI Content Generation
Trigger: Schedule (daily at 8am) โ Action: Read topics from Google Sheets โ Action: Generate post with OpenAI โ Action: Publish to Telegram/Twitter/LinkedIn. Fully automated content pipeline.
3. AI Email Triage
Trigger: Gmail (new email) โ Action: Classify intent with OpenAI โ Logic: IF "support request" โ create Notion task. IF "sales inquiry" โ notify sales team. Handles 80% of incoming email without human attention.
4. Voice Transcription Pipeline
Trigger: Webhook with audio file URL โ Action: Transcribe with Whisper โ Action: Summarize with GPT-4o โ Action: Save to Google Sheets + notify via Telegram.
5. AI Support Bot with RAG
Trigger: Telegram message โ Action: Search Pinecone for relevant context โ Action: Build prompt with context + user question โ Action: Generate answer with OpenAI โ Action: Reply in Telegram. Full retrieval-augmented generation in n8n.
Error Handling in n8n
Production workflows need robust error handling. Three things to set up immediately:
- Retry on fail โ enable on API nodes (3 retries, 5s delay)
- Error workflow โ a separate workflow that runs when the main one fails (sends you a Telegram alert)
- Continue on error โ for non-critical nodes that shouldn't break the whole flow
n8n AI Nodes: The Power Tools
n8n has dedicated AI nodes that make building LLM applications much easier than raw HTTP requests:
- AI Agent โ autonomous agent with tools and memory
- Chat Memory Manager โ maintain conversation history
- Vector Store โ connect to Pinecone, Supabase, or in-memory store
- Document Loader โ load PDFs, websites, Google Docs into your knowledge base
- Text Splitter โ chunk documents for RAG pipelines
n8n vs Make vs Zapier: Which Should You Choose?
| Feature | n8n | Make | Zapier |
|---|---|---|---|
| Price (free tier) | โ Free self-hosted | โ 1,000 ops/mo | โ 100 tasks/mo |
| Self-hosting | โ Yes | โ No | โ No |
| AI/LLM nodes | โ Native | โ ๏ธ Limited | โ ๏ธ Limited |
| Complexity | โ ๏ธ Medium | โ Low | โ Lowest |
| Custom code | โ JavaScript | โ ๏ธ Limited | โ No |
Our recommendation: Start with n8n. The learning curve is worth it โ you get unlimited executions, full control, and a platform that scales from simple Zaps to full AI agent orchestration.
Next Steps
Now that you understand n8n basics, here's what to build next:
- Build a client-facing chatbot (our AI Chatbot Development course covers this in 3 weeks)
- Connect an AI voice agent using Vapi.ai and n8n
- Build a RAG pipeline with Pinecone for document Q&A
- Automate your entire content pipeline from topics to published posts
The best way to learn n8n is to automate something you actually do manually today. Pick one repetitive task, build a workflow for it, and iterate from there.