n8n Tutorial for Beginners: Build Your First Automation in 30 Minutes
n8n is the most powerful open-source workflow automation tool available. It lets you connect apps, automate tasks, and build AI-powered workflows without writing code — while giving developers the full flexibility of code when they need it. This tutorial gets you from zero to your first working automation.
What Is n8n?
n8n is a workflow automation platform that connects apps and services. You build workflows in a visual node-based editor — drag nodes onto a canvas, connect them with edges, configure each node's settings.
Unlike Zapier or Make.com, n8n is:
- Open-source — run it yourself on any server
- Code-optional — built-in Function and Code nodes let you write JavaScript when needed
- More powerful — complex branching, looping, error handling that other tools can't match
- More affordable — self-hosted is free; cloud plans are competitive
n8n has 400+ native integrations (Google, Slack, HubSpot, Airtable, MySQL, etc.) plus HTTP and webhook nodes for anything else.
Installation
Quickest option — n8n Cloud: Sign up at n8n.io. No installation required. Start building in minutes.
Self-hosted with npm:
n8n starts on port 5678. Open http://localhost:5678.
Self-hosted with Docker (recommended for production):
Self-hosted with Docker Compose:
Your First Workflow
Let's build a simple workflow: every time a new row is added to a Google Sheet, send an email notification.
Step 1: Create a new workflow Click "+" → "New Workflow". You'll see an empty canvas.
Step 2: Add a trigger Every workflow starts with a trigger. Click the "+" on the canvas. Search for "Google Sheets" → select "Google Sheets Trigger."
Configure:
- Authentication: Add your Google account
- Spreadsheet: select your spreadsheet
- Sheet Name: select your sheet
- Trigger On: Row Added
Step 3: Add an email node Click "+" after the trigger. Search "Gmail" → select "Gmail" → Action: Send Email.
Configure:
- To: your email address
- Subject:
New row added: {{$json.Name}} - Message:
New entry: {{$json}}
The {{$json.fieldName}} syntax accesses data from the previous node.
Step 4: Test and activate Click "Execute Workflow" to test with real data. Fix any issues. Click the toggle to "Active."
Your workflow now runs automatically whenever a new row is added.
Understanding Node Types
Trigger nodes: Start a workflow. Examples: Schedule, Webhook, Gmail, Google Sheets, Airtable, HTTP (for receiving webhooks).
Action nodes: Do something. Examples: Send email, Create HubSpot contact, Insert database row, HTTP Request.
Logic nodes: Control flow. Examples: IF (conditional), Switch (multi-branch), Loop, Merge.
Data nodes: Transform data. Examples: Set (set fields), Function (JavaScript code), Code (more powerful JS), JSON Parse.
Core nodes: Built-in utilities. Examples: Wait, Stop and Error, Execute Workflow (run another workflow).
Expressions and Data
n8n passes data between nodes as JSON objects. Access previous node data with expressions:
Use expressions in any node configuration field to make values dynamic.
Common Workflow Patterns
Webhook → Process → Send: HTTP Webhook trigger → Code node (process data) → Email/Slack/API node (send output)
Schedule → Fetch → Store: Schedule trigger → HTTP Request (fetch data) → Database/Spreadsheet (store results)
Form → Enrich → CRM: Form submission webhook → HTTP (enrich with Clearbit) → HubSpot (create/update contact)
Email → AI → Reply: Gmail trigger → HTTP (Claude API) → Gmail (send draft)
Recommended Tools
- n8n Cloud — Hosted n8n; easiest to start
- n8n self-hosted — Full control; free for self-host
- Claude API — Add AI to any n8n workflow via HTTP node
- Make.com — Alternative if you prefer a more polished UI
- Airtable — Great data layer for n8n workflows
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.
Complete n8n Guide: Everything You Need to Build Powerful Automations
The definitive n8n guide — nodes, credentials, triggers, and production-grade patterns.