Complete n8n Guide: Everything You Need to Build Powerful Automations
n8n is the open-source workflow automation platform that gives technical teams the power to build sophisticated automations without code limitations. Unlike cloud-only alternatives, n8n can be self-hosted for complete data control — yet its visual canvas is accessible enough for non-developers. This guide covers everything you need to build powerful automations with n8n.
What Makes n8n Different
n8n occupies a unique position in the automation market: it's as capable as custom code but as visual as no-code platforms.
Self-hostable: Run n8n on your own servers. Your data stays on your infrastructure. No per-execution pricing that scales against you. For high-volume automation, this is transformative — the same workflows that would cost hundreds of dollars per month on Make.com or Zapier cost a few dollars per month in VPS infrastructure.
Fair-code licence: The n8n engine is open-source under a fair-code licence — free to self-host for internal use. The cloud offering (n8n.io) is a managed version.
Code nodes: When you need more than what drag-and-drop provides, write JavaScript or Python directly in the workflow. The Code node is the escape hatch for complex logic.
LangChain integration: n8n has native LangChain nodes, making it the best visual platform for building AI agents, RAG pipelines, and multi-step AI workflows.
400+ integrations: HTTP Request node covers anything with a REST API.
Core Concepts
Nodes: The building blocks of n8n workflows. Each node does something: receives data, fetches from an API, processes data, or sends data somewhere. Nodes are connected in sequence.
Workflows: A collection of connected nodes that execute in order from a trigger. Workflows are what you build and run.
Trigger nodes: Special nodes that start workflow execution — on a schedule, on a webhook event, or when something happens in a connected service.
Credentials: Stored authentication for connected services. API keys, OAuth tokens, passwords — stored securely and referenced by nodes. Never embedded directly in workflows.
Expressions: Dynamic values in node configurations. Use {{ $json.email }} to reference the email field from incoming data. Access previous node outputs with {{ $node["Node Name"].json.field }}.
Building Workflows
1. Choose your trigger: Every workflow starts with a trigger. Common options: Schedule (cron-based), Webhook (receives HTTP requests), app-specific triggers (Gmail, HubSpot, Shopify new events).
2. Add processing nodes: After your trigger, add nodes to process data. HTTP Request for API calls, Set for data manipulation, IF for conditional logic, Code for custom JavaScript.
3. Connect credentials: Each integration node needs credentials. Go to Credentials, add credentials for each service, and reference them in the relevant nodes.
4. Map data: Data flows between nodes as JSON objects. In any field, type {{ to open the data mapping panel — it shows all fields from previous nodes. Select the field you need.
5. Test with real data: Use the "Execute" button to run the workflow with real data. Click any node to see what data passed through it.
6. Error handling: Add error workflows and error triggers before deploying to production. When a node fails, an error workflow can alert you and log the issue.
7. Activate: Toggle the workflow to "Active" to enable automatic execution.
AI Workflows with n8n
n8n's AI capabilities are among its strongest differentiators:
Claude integration: Use the HTTP Request node to call Anthropic's Claude API. Pass data from previous nodes as the prompt, receive structured outputs.
OpenAI integration: Native OpenAI node for chat completions, embeddings, and Whisper transcription.
AI Agent node: n8n's built-in AI Agent node supports tool use — give the agent a set of tools (database queries, API calls, calculations) and let it decide how to complete a task.
LangChain nodes: Native LangChain support enables RAG pipelines, memory management, and complex agent architectures without writing framework code.
Production Best Practices
Use PostgreSQL: Self-hosted n8n defaults to SQLite. For production, switch to PostgreSQL. More reliable, better performance, required for queue mode.
Enable queue mode: For high-volume workflows, queue mode decouples the n8n web server from workflow execution. Add Redis and run worker processes separately.
Set execution limits: Configure EXECUTIONS_DATA_PRUNE_MAX_COUNT to prevent the execution database from growing indefinitely.
Monitor with error workflows: Create a dedicated error workflow that logs failures to Airtable and sends Slack alerts when production workflows fail.
Back up credentials: Export and back up credentials separately from workflow JSON. Workflow exports don't include credential values.
Recommended Tools
- n8n — Platform; cloud or self-hosted
- Claude API — AI integration via HTTP node
- HubSpot — CRM with n8n native integration
- Airtable — Data storage for workflow outputs
- Redis — Required for n8n queue mode
“n8n rewards investment in learning. The ceiling is high — teams that master it build automation systems that would take months to develop in custom code.”
Related articles
n8n vs Make.com vs Zapier: a 2026 honest comparison
No affiliate fluff — where each tool wins, where it breaks, and what we actually run.
Self-hosting n8n: a production-grade setup guide
Queue mode, workers, backups, and the security defaults you should never skip.
n8n Tutorial for Beginners: Build Your First Automation in 30 Minutes
A hands-on n8n tutorial that takes you from zero to a working automation in under an hour.