You’ve heard n8n is powerful. You’ve seen the complex workflows. Now you’re wondering: where do I actually start?
This tutorial gets you from zero to a working automation in 15 minutes. We’ll build something real—a workflow that sends you a Slack message when you receive a specific type of email. (Wondering how n8n compares to other tools? Check out our n8n vs Zapier vs Make comparison.)
What You’ll Build
[Gmail] → [Filter: Subject contains "urgent"] → [Slack Message]
Simple, practical, and a foundation for more complex automations.
Step 1: Get n8n Running
You have three options:
Option A: n8n Cloud (Easiest)
- Go to n8n.io
- Click “Start Free”
- Create account
- You’re in the workflow editor
Pros: Zero setup, automatic updates Cons: Limited free tier (2,500 executions/month)
Option B: Docker (Recommended for Learning)
If you have Docker installed:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Then open http://localhost:5678
Pros: Free unlimited usage, data stays local Cons: Requires Docker knowledge
Option C: npm Install
npm install n8n -g
n8n start
Open http://localhost:5678
Step 2: Understand the Interface
When you open n8n, you’ll see:
- Canvas: The main workspace where you build workflows
- Node Panel (left): Search and add nodes (building blocks)
- Node Settings (right): Configure the selected node
- Execution Panel (bottom): See workflow runs and debug
Key concept: Everything in n8n is a node. Nodes connect together to form workflows.
Step 3: Create Your First Workflow
Add the Trigger Node
Every workflow starts with a trigger—the event that kicks things off.
- Click the
+button or drag from the node panel - Search for “Gmail”
- Select Gmail Trigger
You’ll need to connect your Google account:
- Click “Create New Credential”
- Follow the OAuth flow
- Grant n8n access to your email
Configure the Gmail Trigger
Set these options:
- Poll Time: Every 1 minute (for testing)
- Labels: INBOX
- Simple: Off (we want full email data)
Click Test step to pull in a sample email.
Add a Filter Node
Now let’s only process emails with “urgent” in the subject.
- Click the
+on the Gmail node - Search for “IF”
- Add the IF node
Configure the condition:
Value 1: {{ $json.subject }}
Operation: Contains
Value 2: urgent
This checks if the email subject contains “urgent” (case-insensitive).
Add the Slack Node
- Click the
+on the “true” branch of the IF node - Search for “Slack”
- Select Slack
Connect your Slack workspace:
- Create a Slack app or use n8n’s OAuth
- Select your workspace
Configure the message:
- Channel:
#alerts(or your preferred channel) - Text:
🚨 Urgent Email Received!
*From:* {{ $json.from.text }}
*Subject:* {{ $json.subject }}
*Preview:* {{ $json.snippet }}
Test Your Workflow
- Send yourself an email with “urgent” in the subject
- Click Execute Workflow (or wait for the trigger)
- Check your Slack channel
Step 4: Activate and Deploy
Once it works:
- Click the Active toggle (top right)
- Your workflow now runs automatically
That’s it. You’ve built your first automation.
Understanding n8n Expressions
You noticed the {{ }} syntax. These are expressions—n8n’s way of referencing data.
Basic Syntax
| Expression | Meaning |
|---|---|
{{ $json.field }} | Access a field from the previous node |
{{ $json.nested.field }} | Access nested data |
{{ $('NodeName').item.json.field }} | Access data from a specific node |
{{ $now }} | Current timestamp |
Examples
// Get email sender
{{ $json.from.text }}
// Get first item from an array
{{ $json.attachments[0].filename }}
// Conditional text
{{ $json.priority === 'high' ? '🔴' : '🟢' }}
// Format date
{{ $json.date.toLocaleString() }}
Common Beginner Mistakes
Mistake 1: Not Testing Nodes Individually
Fix: Click “Execute Node” (not workflow) to test one node at a time. This helps isolate issues.
Mistake 2: Forgetting to Activate
Your workflow won’t run automatically until you toggle it active.
Mistake 3: Using Wrong Expressions
If an expression shows undefined, the data path is wrong. Click the expression editor to see available fields.
Mistake 4: Not Handling Errors
Production workflows need error handling. Add a Error Trigger workflow to catch failures.
Your Next Steps
Now that you have the basics, try these progressions:
Level 2: Add Data Transformation
Insert a Set node to restructure data before sending to Slack:
{
"sender": {{ $json.from.text }},
"subject": {{ $json.subject }},
"received_at": {{ $now.toISO() }},
"is_urgent": true
}
Level 3: Connect Multiple Services
Expand to: Gmail → Google Sheets (log) → Slack (notify)
Level 4: Add AI Processing
Use the OpenAI or Anthropic node to classify email intent before routing.
Workflow Templates to Try
n8n has a template library. Search for these beginner-friendly examples:
- RSS to Slack: Get notified of new blog posts
- Form to Spreadsheet: Capture form submissions
- GitHub to Discord: Notify on new PRs
- Calendar Reminder: Daily agenda via email
Debugging Tips
Execution History
Every workflow run is logged. Click Executions to see:
- What triggered the run
- What data passed through each node
- Where errors occurred
Manual Testing
Use Execute Workflow with test data to debug without waiting for triggers.
Console Logging
In Code nodes, use console.log() to inspect data:
console.log('Processing item:', $json);
return $json;
Resources for Learning More
Built something cool? Want help with a complex workflow? Let’s chat.