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)

  1. Go to n8n.io
  2. Click “Start Free”
  3. Create account
  4. You’re in the workflow editor

Pros: Zero setup, automatic updates Cons: Limited free tier (2,500 executions/month)

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.

  1. Click the + button or drag from the node panel
  2. Search for “Gmail”
  3. Select Gmail Trigger

You’ll need to connect your Google account:

  1. Click “Create New Credential”
  2. Follow the OAuth flow
  3. 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.

  1. Click the + on the Gmail node
  2. Search for “IF”
  3. 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

  1. Click the + on the “true” branch of the IF node
  2. Search for “Slack”
  3. Select Slack

Connect your Slack workspace:

  1. Create a Slack app or use n8n’s OAuth
  2. 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

  1. Send yourself an email with “urgent” in the subject
  2. Click Execute Workflow (or wait for the trigger)
  3. Check your Slack channel

Step 4: Activate and Deploy

Once it works:

  1. Click the Active toggle (top right)
  2. 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

ExpressionMeaning
{{ $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:

  1. RSS to Slack: Get notified of new blog posts
  2. Form to Spreadsheet: Capture form submissions
  3. GitHub to Discord: Notify on new PRs
  4. 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.