Tool Guide · n8n · 2025

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.

400+Native integrations
$0Per-execution cost (self-hosted)
100%Open source
#14Byte primary tool
📖18 min read
⚙️Technical Guide
Updated July 2025
🏢By 4Byte Agency
n8n_overview.md

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.

2019
Created
Apache 2.0 / EE
License
52K+
GitHub Stars
400+
Integrations

▸ 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.

Feature
n8n ✓
Make.com
Zapier
Self-hosting
✓ Full self-host
✗ Cloud only
✗ Cloud only
Per-execution cost
✓ None (self-hosted)
✗ Yes (ops-based)
✗ Yes (task-based)
Custom code nodes
✓ JS + Python
△ Limited
△ Code by Zapier (limited)
AI / LLM integrations
✓ Best in class
△ Basic
△ Basic
Built-in AI Agent node
✓ Native ReAct agent
✗ No
✗ No
Visual workflow builder
△ Good
✓ Best
✓ Simplest
Native integrations
400+
1,500+
6,000+
Error handling
✓ Advanced
△ Moderate
△ Basic
Version control / Git
✓ Native Git sync
✗ No
✗ No
Pricing (self-hosted)
$0 + server ($5–20/mo)
From $9/mo
From $19.99/mo
Choose n8n when
  • You need AI/LLM integrations
  • High volume (1K+ executions/day)
  • Data must stay on your servers
  • Complex custom logic required
  • Long-term cost matters
Choose Make.com when
  • Non-technical team manages workflows
  • Rapid prototyping needed
  • Under 10K operations/month
  • 1,500+ app integrations needed
  • Visual builder is top priority
Choose Zapier when
  • 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

Webhook

Receives HTTP POST/GET from any external service. The most flexible trigger — anything that can send a webhook can start an n8n workflow.

Schedule

Runs workflows on a cron schedule — every minute, hourly, daily, weekly. Essential for automated reports and batch processing jobs.

Email Trigger (IMAP)

Monitors an inbox and triggers the workflow when a new email arrives matching specified criteria.

Polling Triggers

Native triggers for 400+ apps (HubSpot, Slack, Airtable, Notion, etc.) that poll for new data at a defined interval.

🧠

AI & LLM Nodes

OpenAI

Covers chat completion, embeddings, image generation, and Assistants API. GPT-4o is 4Byte's default for most AI workflow tasks.

Anthropic (Claude)

Claude 3.5 Sonnet node for complex reasoning tasks — document analysis, long-form extraction, and precise instruction following.

AI Agent

n8n's built-in ReAct agent node. Attach tools (HTTP requests, database queries, other nodes) and the agent autonomously decides which to call.

Embeddings + Vector Store

Native nodes for Pinecone, Supabase pgvector, and Qdrant. Build RAG pipelines visually — ingest documents, store embeddings, retrieve on query.

🔄

Data Processing

Code Node

Execute arbitrary JavaScript or Python. Accepts all previous node data, returns transformed data. The escape hatch for anything not covered by native nodes.

Set / Edit Fields

Map, rename, add, or remove fields from the data object passing through the workflow. Essential for data normalisation.

IF / Switch

Conditional branching based on any field value, expression, or regex match. Routes workflow execution down different paths.

Merge / Split in Batches

Combines data from multiple branches or splits large arrays into chunks for batch processing without hitting API rate limits.

🔗

Integrations

HTTP Request

Make any REST API call — GET, POST, PUT, DELETE — with custom headers, auth, and body. Connects n8n to any API without a native node.

Google Sheets / Docs

Read and write Google Sheets rows, create Docs from templates, and manage Drive files. One of the most-used nodes for data logging.

Slack / Teams

Send messages to channels or DMs, post formatted blocks, create Slack alerts for workflow completions or errors.

Database (PostgreSQL / MySQL)

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.

01

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.

Hetzner CX21
$5.90/mo
Most cost-efficient for stable load
Railway
$5–15/mo
Easiest deployment, auto-scaling
DigitalOcean Droplet
$12/mo
Familiar for teams already on DO
AWS EC2 t3.small
$15–18/mo
Enterprise teams needing AWS ecosystem
02

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=strongpassword
03

Configure 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.

N8N_ENCRYPTION_KEY — encrypt all stored credentials
WEBHOOK_URL — public URL for incoming webhooks
N8N_EMAIL_MODE=smtp — execution failure notifications
EXECUTIONS_DATA_PRUNE=true — auto-delete old execution logs
N8N_BASIC_AUTH_ACTIVE=true — protect the UI with password

▸ 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)
Email TriggerAI NodeIF / Switch routing
Prompt Pattern

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)
HTTP Request (fetch PDF) → Extract from FileAI NodeSet Node → Database insert
Prompt Pattern

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 → Anthropic
Webhook or Chat TriggerAI NodeRespond to Webhook / Slack
Prompt Pattern

System: "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)
Webhook / ScheduleAI NodeGmail / HubSpot
Prompt Pattern

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

Intermediate12 nodes
Trigger:Email Trigger (IMAP) — monitors sales@company.com

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.

1
[Email Trigger (IMAP)] Triggers on new email in sales@company.com
2
[OpenAI (GPT-4o)] Classifies email: lead / support / partnership / spam. Extracts name, company, need, urgency 1–10.
3
[IF Node] Routes based on classification — lead vs non-lead
4
[HTTP Request (Clearbit)] Enriches company data — size, industry, tech stack, funding
5
[HubSpot] Creates contact + deal with all enriched fields populated
6
[Slack] Sends briefing card to #sales channel with lead summary and urgency score
Time Saved
35 min/lead · 200 leads/mo = 116 hrs saved
Build Time & Cost
1.5 weeks · $3,200

AI Support Ticket Classifier

Beginner8 nodes
Trigger:Webhook — Zendesk ticket.created event

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.

1
[Webhook] Receives Zendesk ticket.created event with full ticket payload
2
[Anthropic (Claude 3.5)] Classifies topic (billing/technical/feature/account) and scores urgency 1–10
3
[Switch Node] Routes by topic to correct team queue branch
4
[HTTP Request (Zendesk API)] Adds classification tags and assigns to correct team
5
[IF Node] Checks if urgency score ≥ 8
6
[Slack] Sends urgent alert to #support-escalations with ticket link and AI summary
Time Saved
2 hrs/day for support lead · $18K/yr value
Build Time & Cost
1 week · $2,400

Weekly Business KPI Report

Intermediate15 nodes
Trigger:Schedule — every Monday 07:00

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.

1
[Schedule Trigger] Fires every Monday at 07:00
2
[HTTP Request (HubSpot)] Pulls 7-day pipeline, deals closed, new contacts
3
[HTTP Request (Google Analytics)] Pulls 7-day sessions, conversions, top pages
4
[HTTP Request (Stripe)] Pulls 7-day revenue, MRR, new subscriptions
5
[Code Node (JS)] Calculates week-over-week deltas and formats data object
6
[OpenAI (GPT-4o)] Generates plain-English commentary on trends and anomalies
7
[Gmail] Sends branded HTML report to leadership distribution list
Time Saved
4 hrs/week · 1 full work day recovered per month
Build Time & Cost
2 weeks · $4,800

RAG-Powered Internal Knowledge Agent

Advanced18 nodes
Trigger:Webhook — Slack slash command /ask

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.

1
[Webhook] Receives Slack slash command payload with user question
2
[OpenAI Embeddings] Generates embedding vector for the user's question
3
[Pinecone] Semantic search — retrieves top 5 most relevant document chunks
4
[Code Node (JS)] Formats retrieved chunks into RAG context string
5
[Anthropic (Claude 3.5)] Generates accurate answer grounded in retrieved context
6
[HTTP Request (Slack API)] Posts answer back to Slack with source document references
Time Saved
1–2 hrs/employee/week on information lookup
Build Time & Cost
3 weeks · $7,500

▸ 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.

Self-Hosted (Free)
$0
+ server cost ($5–20/mo)
  • Unlimited workflows
  • Unlimited executions
  • All 400+ native integrations
  • All AI/LLM nodes
  • Custom code nodes (JS + Python)
  • Git version control
  • Community support
Best For
4Byte's primary choice for all production projects
n8n Cloud Starter
$20/mo
2,500 executions included
  • Managed hosting (no server needed)
  • Up to 2,500 executions/mo
  • All integrations included
  • AI nodes included
  • 7-day execution log history
  • Email support
Best For
Small teams testing automation without DevOps
n8n Cloud Pro
$50/mo
10,000 executions included
  • All Starter features
  • Up to 10,000 executions/mo
  • Workflow history & versioning
  • SSO / team permissions
  • Priority support
  • Custom variables
  • External secrets manager
Best For
Growing teams with multiple workflows
▸ Self-Hosted vs Cloud Cost at 50,000 Executions/Month
n8n Self-Hosted (Hetzner)
$12/mo
Server only. Zero execution fees.
n8n Cloud
~$500/mo
At 50K executions on Pro plan
Zapier
~$1,200/mo
At 50K tasks on Professional plan

▸ 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.

45+
Products shipped
5.0★
Client satisfaction
1–2 wks
First workflow live
$0/exec
Self-hosted cost
🔧
Full n8n Setup & Configuration
Self-hosted on your infrastructure, custom domain, SSL, PostgreSQL, and production config.
🧠
AI Workflow Development
GPT-4o and Claude integrations, RAG pipelines, AI Agent nodes with custom tools — all tested in production.
📊
Monitoring & Handover
Error alerting, execution dashboards, full documentation, and team training included on every project.

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.

▸ Ready to build with n8n?

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.

Available now
Response in ≤ 4 hours
No commitment required
n8n-automation.build
OPEN
Book a free n8n automation strategy call with 4Byte Agency
⚙️

Self-Hosted

Your server, your data

Live in Weeks

Not months

🛡️

No Obligation

Zero pressure