n8n Automation Guide — Build AI Workflows in 2025
n8n is an open-source, self-hostable workflow automation platform with native AI and LLM integrations — the most powerful tool available for building production AI workflows in 2025. This guide covers everything: what it is, how to self-host it, the key nodes, real AI workflow examples, and how 4Byte uses it for client projects.
What is n8n and Why Does 4Byte Use It?
n8n (pronounced "n-eight-n", short for "nodemation") is an open-source workflow automation platform created by Jan Oberhauser in 2019. It connects apps and services through a node-based visual editor, executes custom code, and — crucially for 2025 — has native integrations with every major LLM provider including OpenAI, Anthropic, and Google Gemini.
The key differentiator from Zapier and Make.com is self-hosting. When you run n8n on your own server, there are no per-execution fees — a workflow that runs 100,000 times costs the same as one that runs 100 times. For AI workflows that process high volumes of emails, tickets, or records, this cost difference becomes enormous. 4Byte uses self-hosted n8n on Hetzner or Railway for virtually every production workflow automation project.
▸ Comparison
n8n vs Zapier vs Make.com — Full Feature Comparison
Choosing the right automation platform determines your cost, flexibility, and ceiling. Here is an honest feature-by-feature breakdown of all three tools — and when each one is the right choice.
- ✓You need AI/LLM integrations
- ✓High volume (1K+ executions/day)
- ✓Data must stay on your servers
- ✓Complex custom logic required
- ✓Long-term cost matters
- ✓Non-technical team manages workflows
- ✓Rapid prototyping needed
- ✓Under 10K operations/month
- ✓1,500+ app integrations needed
- ✓Visual builder is top priority
- ✓Absolute simplest setup needed
- ✓Under 1,000 tasks/month
- ✓Team has no technical resource
- ✓6,000+ app integrations needed
- ✓No custom logic required
▸ Node Reference
Essential n8n Nodes — What Each One Does
n8n has 400+ nodes but 90% of production AI workflows are built from fewer than 20. These are the nodes 4Byte uses on every project — grouped by function.
Triggers
Receives HTTP POST/GET from any external service. The most flexible trigger — anything that can send a webhook can start an n8n workflow.
Runs workflows on a cron schedule — every minute, hourly, daily, weekly. Essential for automated reports and batch processing jobs.
Monitors an inbox and triggers the workflow when a new email arrives matching specified criteria.
Native triggers for 400+ apps (HubSpot, Slack, Airtable, Notion, etc.) that poll for new data at a defined interval.
AI & LLM Nodes
Covers chat completion, embeddings, image generation, and Assistants API. GPT-4o is 4Byte's default for most AI workflow tasks.
Claude 3.5 Sonnet node for complex reasoning tasks — document analysis, long-form extraction, and precise instruction following.
n8n's built-in ReAct agent node. Attach tools (HTTP requests, database queries, other nodes) and the agent autonomously decides which to call.
Native nodes for Pinecone, Supabase pgvector, and Qdrant. Build RAG pipelines visually — ingest documents, store embeddings, retrieve on query.
Data Processing
Execute arbitrary JavaScript or Python. Accepts all previous node data, returns transformed data. The escape hatch for anything not covered by native nodes.
Map, rename, add, or remove fields from the data object passing through the workflow. Essential for data normalisation.
Conditional branching based on any field value, expression, or regex match. Routes workflow execution down different paths.
Combines data from multiple branches or splits large arrays into chunks for batch processing without hitting API rate limits.
Integrations
Make any REST API call — GET, POST, PUT, DELETE — with custom headers, auth, and body. Connects n8n to any API without a native node.
Read and write Google Sheets rows, create Docs from templates, and manage Drive files. One of the most-used nodes for data logging.
Send messages to channels or DMs, post formatted blocks, create Slack alerts for workflow completions or errors.
Direct database read/write. Execute custom SQL queries, insert rows, update records — no ORM required.
▸ Self-Hosting
How to Self-Host n8n — Production Setup Guide
Self-hosting n8n eliminates per-execution costs and keeps your data on your servers. Here is exactly how 4Byte sets up production n8n instances for client projects.
Choose Your Infrastructure
For most businesses, a $6–12/month Hetzner Cloud VPS (CX21 — 2 vCPU, 4GB RAM) handles 10,000+ workflow executions per day comfortably. For higher volume, Railway or Render provide managed infrastructure with automatic scaling.
Deploy with Docker
The official n8n Docker image is the recommended deployment method. A basic docker-compose.yml with PostgreSQL (not SQLite for production) gets you live in under 30 minutes. Add Traefik or Nginx as a reverse proxy for SSL termination.
# docker-compose.yml (production)
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=your-domain.com
- N8N_PROTOCOL=https
- DB_TYPE=postgresdb
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_HOST=postgres
- EXECUTIONS_MODE=queue
volumes:
- n8n_data:/home/node/.n8n
postgres:
image: postgres:15
environment:
- POSTGRES_DB=n8n
- POSTGRES_PASSWORD=strongpasswordConfigure for Production
Before going live, configure these four critical settings: set N8N_ENCRYPTION_KEY for credential encryption, configure SMTP for email notifications, set up webhook URL routing through your domain, and enable execution pruning to prevent the database from growing indefinitely.
▸ AI Workflow Patterns
How to Use n8n AI Nodes — 4 Production Patterns
The AI nodes in n8n are powerful but require correct prompt patterns and node sequencing to work reliably in production. Here are the four most common AI workflow patterns 4Byte uses — with exact prompt templates.
Email Classification
OpenAI (GPT-4o)System: "You are an email classifier. Respond ONLY with a JSON object containing: category (lead/support/partner/spam), urgency (1-10), extracted_name, extracted_company, summary (max 50 words)."
Force JSON output using response_format: json_object — never parse freeform text from LLMs in production workflows.
Document Data Extraction
Anthropic (Claude 3.5)System: "Extract the following fields from this invoice: vendor_name, total_amount, currency, due_date, line_items[]. Respond only in valid JSON. If a field is not found, return null."
Claude 3.5 outperforms GPT-4o on structured extraction from long or complex documents. Use it for invoices, contracts, and reports.
RAG Knowledge Retrieval
OpenAI Embeddings → Pinecone → AnthropicSystem: "Answer the user's question using ONLY the context provided below. If the answer is not in the context, say so clearly. Do not hallucinate." Context: {{retrieved_chunks}}
Always inject retrieved chunks as a separate system message block, not concatenated into the user message. Separation improves retrieval accuracy by 15–25%.
AI Agent with Tools
AI Agent Node (ReAct)System: "You are a sales assistant. Use the tools available to: 1) Look up the company in HubSpot, 2) Check for recent news about them, 3) Draft a personalised outreach email. Always complete all 3 steps."
The n8n AI Agent node's tools are other n8n nodes. Add HTTP Request nodes as tools for any API call the agent needs to make. Test each tool node in isolation first.
▸ Real Workflows
4 Production n8n AI Workflows — Step by Step
Not templates — these are real n8n AI workflows 4Byte has built and deployed in production. Each includes the exact node sequence, trigger, business outcome, and build cost.
AI Email Triage & CRM Pipeline
Every inbound email is read by GPT-4o which classifies intent, extracts structured data, and routes it to the right system — eliminating manual email processing entirely.
AI Support Ticket Classifier
Every new support ticket is classified by Claude 3.5, tagged, routed to the right team queue, and triggers an urgent alert for high-priority issues — zero manual triage.
Weekly Business KPI Report
Pulls live data from five systems, compares to prior periods, generates plain-English commentary using GPT-4o, formats into a branded HTML report, and emails to leadership — fully automated.
RAG-Powered Internal Knowledge Agent
Employees type /ask [question] in Slack. n8n retrieves the most relevant internal docs from Pinecone, injects them into a Claude 3.5 prompt, and returns an accurate answer — sourced from your actual business knowledge base.
▸ Pricing
n8n Pricing — Self-Hosted vs Cloud
n8n is uniquely cost-effective because self-hosting eliminates per-execution fees entirely. Here is how the economics compare at different scales.
- ✓Unlimited workflows
- ✓Unlimited executions
- ✓All 400+ native integrations
- ✓All AI/LLM nodes
- ✓Custom code nodes (JS + Python)
- ✓Git version control
- ✓Community support
- ✓Managed hosting (no server needed)
- ✓Up to 2,500 executions/mo
- ✓All integrations included
- ✓AI nodes included
- ✓7-day execution log history
- ✓Email support
- ✓All Starter features
- ✓Up to 10,000 executions/mo
- ✓Workflow history & versioning
- ✓SSO / team permissions
- ✓Priority support
- ✓Custom variables
- ✓External secrets manager
▸ Build With 4Byte
Need n8n AI Workflows Built and Deployed for Your Business?
n8n is 4Byte Agency's primary workflow automation platform. We design, build, and self-host n8n systems for clients — including AI-powered workflows with GPT-4o and Claude integrations, custom code nodes, error handling, monitoring dashboards, and full handover documentation.
Book a free 30-minute strategy call. We will map your highest-ROI workflow, design the n8n architecture, and give you a transparent build cost and timeline — no commitment required.
Accepting new n8n automation projects
Free strategy call · ≤ 4h response · No obligation
▸ FAQ
n8n Automation — Common Questions
The most common questions about n8n — answered directly from 4Byte's production experience.
What is n8n?+
n8n is an open-source, self-hostable workflow automation platform that connects apps and services through a visual node-based editor. Unlike Zapier or Make.com, n8n can be self-hosted giving you full data control and zero per-execution costs at scale. It supports 400+ native integrations and allows custom JavaScript/Python code nodes for any logic not covered by native nodes.
Is n8n free?+
n8n is free to self-host — you only pay for the server it runs on (typically $5–$20/month on Hetzner, Railway, or DigitalOcean). The cloud version (n8n.cloud) has a free tier with 2,500 executions/month, with paid plans from $20/month. For production AI workflows at scale, 4Byte always recommends self-hosting to eliminate per-execution costs.
How does n8n compare to Zapier and Make.com?+
n8n is more powerful than both Zapier and Make.com for complex AI workflows because it supports custom code nodes, self-hosting, and has the best LLM/AI tool integrations in 2025. Zapier is simplest but most expensive at scale and least flexible. Make.com has the best visual editor for non-technical users. n8n is 4Byte's primary choice for all AI workflow projects due to its flexibility, self-hosting capability, and superior AI integrations.
Can n8n integrate with OpenAI and Claude?+
Yes. n8n has native nodes for OpenAI (chat completion, embeddings, image generation, assistants), Anthropic Claude, Google Gemini, Hugging Face, and most major LLM providers. It also has a built-in AI Agent node that implements the ReAct loop, tool calling, and memory — making it possible to build full AI agents visually without code.
How do I self-host n8n?+
n8n can be self-hosted via Docker (recommended), npm, or using managed platforms like Railway or Render. The simplest path is deploying the official n8n Docker image on a $6/month Hetzner VPS or $5/month Railway project. For production, add a PostgreSQL database (instead of SQLite), configure a custom domain with SSL, and set up webhook tunneling. 4Byte includes n8n self-hosting setup as part of all workflow automation projects.
Does 4Byte Agency build n8n automation systems?+
Yes. n8n is 4Byte's primary workflow automation platform. We build self-hosted n8n systems for clients — including AI-powered workflows with LLM integrations, custom code nodes, complex error handling, and full monitoring. Projects range from single workflows ($1,500–$4,000) to full department automation suites ($8,000–$25,000). Book a free strategy call to discuss your use case.
▸ Continue Learning
Related AI Automation Resources
Let's Build Your n8n AI Workflow System — Self-Hosted and Production-Ready.
Book a free 30-minute call with 4Byte. We'll design your n8n workflow architecture, recommend the right AI integrations, and give you a transparent cost and timeline estimate — no commitment needed.

Self-Hosted
Your server, your data
Live in Weeks
Not months
No Obligation
Zero pressure