The gist
Key concepts
- n8n (pronounced "n-eight-n," a visual automation tool): a workflow automation platform with source-available code (a fair-code license, the Sustainable Use License); you can run it on your own server, unlike Zapier (a platform for connecting services), which only works in the cloud
- LLM node (LLM: large language model; a node is a block or step in the visual builder): a block in a workflow that sends data to a language model (Claude, GPT, Mistral) and gets back a processed result
- AI Agent node: Claude as an orchestrator (a coordinator of many steps and tools) with access to tools: it can decide for itself which tool to call next
- Workflow: a visual automation diagram: a trigger (the event that starts the automation) → a chain of actions → the final result
- Webhook: an "entry point" for data from outside: a form submission from a website, an event from a CRM, a chat message
- Self-hosting: n8n runs on your server, all the data stays with you, and there are no task limits
- Supabase: a PostgreSQL database as a service; it stores workflow results for history and analytics
- Selling workflows to clients: packaging ready-made workflows as a done-for-you service (within the terms of the n8n license, see below)
Theory
n8n vs Zapier and Make: choosing a platform
When a business owner starts automating processes, they run into three main platforms: Zapier, Make (formerly Integromat) and n8n. The difference between them is fundamental, and for anyone who wants to build AI workflows for clients the choice is often obvious, but each platform has terms you need to know.
Zapier is the most popular and the simplest. There's a free plan with limits; paid plans are priced by the number of tasks (each "Zap," a separate automation, uses up tasks). Zapier has AI features: Copilot builds a workflow from a description, Zapier Agents carry out tasks autonomously, and Zapier MCP gives AI assistants access to apps. The big plus is thousands of integrations out of the box (Zapier claims 9,000+). The big minus is that as volume grows, the price grows with the number of tasks, and customization is limited.
Make (formerly Integromat) is more flexible than Zapier for complex scenarios. It has a visual editor with branches and loops; you pay with credits, and there's a free plan. Make has AI agents (Make AI Agents). It's a good place to start, but it's a cloud service: your clients' data sits on Make's servers.
n8n is a different category. The source code is available (a fair-code license), and you can run it on your own server. The self-hosted Community Edition is free, with no limit on the number of executions: you only pay for the server. You can write any JavaScript right inside a workflow using the Code node. There are built-in AI nodes for working with LLMs. And most importantly, your data stays on your server, which is critical for clients with confidentiality requirements.
Self-hosting n8n: Railway, Render and a VPS
Running n8n yourself is easier than it sounds. There are three main options:
Railway.app is a platform for deploying apps. n8n deploys from a ready-made template in a few minutes. The cost depends on usage; see Railway's pricing. You get automatic restarts, SSL, and your own PostgreSQL database. Recommended for getting started.
Render.com is similar to Railway and also has an n8n template. The free tier, if available, is limited (the service may go to sleep when idle), and for always-on operation you need a paid plan. Good for testing.
A VPS (DigitalOcean, Hetzner and others) gives you full control and is often the cheapest option, but it takes basic Linux skills: installing Docker, setting up nginx and Let's Encrypt. Hetzner offers good hardware at a low price in Europe and the US. Best for clients with data residency requirements.
n8n Cloud is the hosted option from the makers of n8n. Convenient, with no server to set up. As of October 2026: Starter is €20 a month (2,500 executions) and Pro is €50 (10,000), billed annually; what counts is executions of the whole workflow, not individual steps. Convenient for experiments and small volumes; at large volumes, compare it with self-hosting.
n8n AI nodes: LLM Chain, OpenAI, Claude, AI Agent
n8n has built-in AI nodes in the "AI" section. Here are the main ones:
Basic LLM Chain is the simplest AI node. It takes text, sends it to an LLM (GPT, Claude, Mistral, Ollama and others), and returns the answer. You set the system prompt, temperature and model. Perfect for data enrichment: take a lead from your CRM, send it to Claude with the question "what do you know about this company," and get a short profile back.
OpenAI Chat Model / Anthropic Claude Model are nodes for connecting specific providers. They support all the API parameters: model choice, tokens (units of text for AI), streaming (sending data as a stream). The Claude node (Anthropic Chat Model) works with Claude models through the Anthropic API; the list of available models is in the node itself. Current names: What's current.
AI Agent (an agent is an autonomous AI worker) is the most powerful node. Here Claude acts not just as a "text processor" but as an orchestrator with tools. You describe a task to the agent and give it a set of tools (HTTP Request, an SQL query, sending an email). The agent decides on its own which tool to call and in what order, and handles multi-step tasks. For example: "Find information about company X, check whether they have job openings on their website, write a personalized email, and record the result in the CRM."
Vector Store Tool connects a knowledge base (via Pinecone, Supabase Vector, Qdrant) to the AI Agent. Now the agent can answer questions based on your documents. Ready-made RAG (Retrieval-Augmented Generation) with no code.
Workflow 1: lead enrichment with Claude
Let's walk through a real scenario. A form submission comes in from your website: name, email, company name. You need to automatically gather information about the company, rate how promising the lead is, and record it in the CRM.
The workflow:
- Webhook: receives the form data (name, email, company)
- HTTP Request: calls the API of a data enrichment service (Apollo, for example) and gets company data (size, industry, technologies)
- Claude LLM Chain: gets all the data and runs the prompt: "Rate this lead from 1 to 10 and give a short rationale. Company: {data}. Our product is for B2B SaaS companies with 50-500 employees."
- IF node: branches on the score: score ≥ 7 → hot lead, score < 7 → cold
- HubSpot / Pipedrive node: creates a contact in the CRM with fields for the score, Claude's rationale, and the source data
- Slack or Telegram node: sends a notification to the team chat for hot leads
This workflow saves manual work on every lead. Estimate it with your own numbers: minutes per lead × number of leads per month.
Example JSON for an AI node in n8n (simplified):
{
"name": "Claude Lead Scorer",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"parameters": {
"model": "claude-sonnet-5-5",
"messages": {
"messageType": "multipleRoles",
"values": [
{
"type": "system",
"message": "You are an expert at evaluating B2B leads. Rate how promising the lead is from 1 to 10 and give a short rationale in 2-3 sentences."
},
{
"type": "human",
"message": "Company: {{ $json.company_name }}\nSize: {{ $json.employee_count }} employees\nIndustry: {{ $json.industry }}\nTechnologies: {{ $json.technologies }}\nEmail: {{ $json.email }}"
}
]
}
},
"credentials": {
"anthropicApi": {
"id": "YOUR_CREDENTIAL_ID",
"name": "Anthropic API"
}
}
}Workflow 2: a content pipeline with RSS and a chat channel
The second practical scenario: monitoring industry news and automatically posting a digest to a channel (a Telegram channel, a Slack channel or a newsletter).
The workflow:
- Schedule Trigger: runs every 4 hours
- RSS Feed node: reads 3-5 RSS feeds from competitors / industry media
- SplitInBatches: splits them into individual articles
- IF node: keeps only articles from the last 4 hours
- Claude LLM Chain: prompt: "Summarize the article in 3 sentences in English with emoji. State the main point and why it matters to business owners."
- Aggregate: collects all the summaries into one list
- Claude LLM Chain (a second one): creates the final digest: "From these materials, write a readable channel post with a headline, a roundup and a call to action"
- Telegram or Slack node: posts to the channel
The result: the channel runs on autopilot. AI makes mistakes, so at the start keep a manual review step before posting, and remove it only once you're confident in the quality.
AI Agent as an orchestrator with tools
Setting up an AI Agent in n8n:
- Add an AI Agent node
- Choose a language model (Claude is the best choice for complex tasks)
- Add Tools: these can be other nodes, like HTTP Request, PostgreSQL, Send Email, Slack
- Write a system prompt describing the agent's role and the available tools
- Feed in the incoming task
A real-world example: an agent for handling support requests.
System prompt: You are a support agent for TechCorp. You have these tools: - search_knowledge_base: search the knowledge base - get_order_status: get an order's status by email - create_ticket: create a ticket for the team - send_email: send an email to the customer When you receive a request: 1. First, look for the answer in the knowledge base 2. If you need order data, request it 3. If you can resolve it yourself, send the customer a reply 4. If you can't, create a ticket for the team
The agent decides the sequence of actions on its own, based on the specific request. No rigid if-else branches.
n8n + Supabase: history and analytics
Supabase is PostgreSQL as a service, with a friendly interface and a free tier (as of October 2026: a database of up to 500 MB, and the project is paused after a week of inactivity). Paired with n8n, it becomes the place to store workflow results.
What to store in Supabase:
- Every incoming lead with Claude's score and the date
- The content pipeline's posting history (what was posted, when, clicks)
- Agent session logs: what the agent did, which tools it called
- Workflow metrics: how many tasks were processed, errors, average time
Why this matters: after a month of running, you see the real picture. Which leads with a high Claude score actually converted? Which types of content get more reactions? That's the data you need to tune your prompts and workflow logic.
n8n has a built-in Supabase node: insert, update and select without SQL. For complex queries there's the PostgreSQL node with direct SQL.
Selling n8n workflows to clients
How to package a workflow as a product:
Type 1: Template: a ready-made workflow. The client deploys it themselves. You sell documentation + a JSON export + a video walkthrough. It scales, but it means a lot of support.
Type 2: Done-for-You: you deploy n8n on the client's server, set up the workflow, and integrate it with their CRM / chat / email. Payment is made up of a setup fee for the project plus monthly maintenance.
Type 3: Vertical SaaS: you use n8n as the engine, build a nice interface on top (with Next.js or Bubble), and sell it as your own product to subscribers. The hardest path. Note: under the n8n license, a product like this, where the value comes from n8n's capabilities and clients set up workflows themselves, requires a commercial license: check the terms with n8n before you launch.
Niches where workflows are in demand:
- Real estate agencies: automatic handling of inquiries + lead scoring
- Online stores: automatic posting to social channels + order processing
- Medical clinics: appointment reminders + collecting reviews (without sending medical data to AI without consent and without following local rules, such as HIPAA in the US)
- HR: resume screening with Claude + notifications (the hiring decision stays with a human)
The advantage over Zapier: the client doesn't pay per task; they pay for setup and support. Prices are set by the market and your costs, and income isn't guaranteed. To see how to put together a package and work out a price, see the lessons Packaging your offer and Pricing and monetization.
n8n license terms (Sustainable Use License). You can build workflows for clients on your own n8n instance and charge for building, setting up and supporting them, as long as the clients don't create or change workflows themselves. You can set up n8n on a client's server and charge for the implementation. You can't host n8n as a service where clients build their own workflows, remove n8n's branding, or sell a product whose value is mainly n8n's own functionality. Those cases require a commercial license. Details: n8n License FAQ.
Practice
Step 1: Deploy n8n on Railway (10 minutes)
- Go to railway.app and sign up with GitHub
- Click New Project → Deploy a Template
- Search for "n8n" in the templates and pick the official one
- Railway automatically creates an n8n service + a PostgreSQL database
- In the settings, add an environment variable:
N8N_ENCRYPTION_KEY= any long string (save it!) - After 2-3 minutes, open the generated URL and create an account
- Save the URL, something like
https://n8n-xxx.railway.app. That's your n8n
Step 2: Connect the Anthropic API
- In n8n → Credentials → Add Credential
- Search for "Anthropic" → enter your API key (from console.claude.com)
- Save it as "Claude API"
- Done: now all your workflows can use Claude
Step 3: Build your first AI workflow (Telegram → Claude → Telegram)
We use a Telegram bot here because it's the quickest bot to create for free; the Slack and WhatsApp nodes work along the same lines.
- New Workflow → Add Trigger: choose Telegram Trigger
- Create a Telegram bot through @BotFather and paste in the token
- Type: Message
- Add Node → AI → Basic LLM Chain
- Credentials: choose "Claude API"
- Model: a current Claude model from the list in the node (as of October 2026, Sonnet 5.5)
- System Prompt: "You are an assistant to a business owner. Answer briefly and to the point in English."
- User Message:
{{ $json.message.text }}
- Add Node → Telegram → Send Message
- Chat ID:
{{ $('Telegram Trigger').item.json.message.chat.id }} - Text:
{{ $json.text }}(Claude's result)
- Chat ID:
- Click Activate: the bot is live
Test: send the bot any question and get an answer from Claude. Your first AI workflow works.
Step 4: Build the lead enrichment workflow
- Trigger: Webhook → copy the webhook URL
- Add Node: HTTP Request: a request to any open API (for example, api.hunter.io to verify emails, or Apollo for company data). For testing, use httpbin.org/anything with test data for now.
- Add Node: Basic LLM Chain (Claude)
- System Prompt: "You are a B2B sales expert. Rate the lead from 1 to 10 and give a short rationale."
- User Message: "Company: {{ $('Webhook').item.json.company }}, size: {{ $('Webhook').item.json.size }}"
- Add Node: Google Sheets: write the result to a spreadsheet (name, email, Claude's score, rationale, date)
- Test: in Postman or curl, send a POST to the webhook URL with the JSON
{"company":"TestCorp","size":"50","email":"[email protected]"} - Check Google Sheets: a row has been added with Claude's score
Step 5: Export it and get it ready to sell
- Workflow menu → Download: download the JSON
- Create a project folder:
workflow-lead-scorer/workflow.json: the workflow itselfREADME.md: what it does, how to set it up, which APIs it needssetup-video.md: a link to a Loom video walkthrough
- Work out the price for your first clients using the lessons Packaging your offer and Pricing and monetization
Tools and resources
| Tool | What it's for | Price | Link |
|---|---|---|---|
| n8n | Workflow platform | Self-hosted Community Edition is free (Sustainable Use License) | n8n.io |
| n8n Cloud | Hosting with no setup | Starter €20 and Pro €50 a month, billed annually (as of October 2026) | app.n8n.cloud |
| Railway | Deploying n8n | Usage-based; pricing on the website | railway.app |
| Render | An alternative to Railway | Pricing on the website | render.com |
| Supabase | Database for history | Free tier with limits | supabase.com |
| Anthropic Claude | The LLM in your workflows | Pay-per-token | console.claude.com |
| n8n community | Ready-made templates | Free | community.n8n.io |
Key takeaways
"n8n with AI nodes isn't just automation. It's handing decisions to a machine. The difference between a simple workflow and a smart one is like the difference between an answering machine and a live employee."
"Self-hosting n8n changes the economics of automation: you pay for the server, not for every task. That means you can run thousands of tasks without worrying about the bill."
"A workflow is an asset. You build it once, set it up for a client, and it keeps running for a long time. While the client pays for support, you have time to build the next workflow."
Next lesson
→ Zapier AI: thousands of apps and smart Zaps
We'll look at when Zapier still beats n8n: simplicity, speed of setup, built-in AI in Zaps, and when a paid Zapier plan makes sense for clients without IT staff.
The mark stays in this browser only and is never sent anywhere. My progress