#n8n #automation #workflow #no-code #low-code #productivity #integration #webhook #API #self-hosted #tutorial #2026

If you’ve ever found yourself copying data between apps, sending the same email every Monday, or manually updating spreadsheets at the end of every day — you’re a prime candidate for workflow automation. And in 2026, n8n has become one of the most powerful, flexible, and developer-friendly automation platforms available — completely free to self-host.

Whether you’re a developer, a business owner, or simply a curious non-technical user, this guide will walk you through setting up your very first n8n automation workflow from scratch. By the end, you’ll have a running, real-world automation that saves you hours every week.

🎯
What You’ll Build in This Guide

A practical email-to-Slack automation: whenever you receive a new email matching certain criteria, n8n will automatically post a formatted notification to your Slack channel — with zero manual effort.

1. What is n8n? A Quick Overview

n8n (pronounced “nodemation”) is a free, open-source workflow automation platform that lets you connect different apps, services, and APIs without needing to write complex code. Think of it as the open-source alternative to Zapier or Make (formerly Integromat) — but with dramatically more power and flexibility.

Founded in 2019 by Jan Oberhauser, n8n has grown to become one of the most-starred automation projects on GitHub, with a vibrant community of developers, businesses, and power users building everything from simple 2-step automations to complex, multi-branch enterprise workflows.

SOURCE APP Gmail, Stripe, Webhooks, etc. n8n WORKFLOW ENGINE TRIGGER PROCESS ACTION 400+ built-in nodes · Conditional logic · Loops · Error handling DESTINATION Slack, Notion, Sheets, etc.

Figure 1 — How n8n works: data flows from a source app through the n8n workflow engine to a destination app automatically.

What makes n8n truly special is its node-based visual interface. You drag, drop, and connect “nodes” — each representing an action or service — to build a visual map of your automation logic. You can also write JavaScript or Python inside nodes for advanced transformations, giving you the best of both the no-code and code worlds.

2. Why Choose n8n Over Zapier or Make?

2. Why Choose n8n Over Zapier or Make?

Photo: Miguel Á. Padriñán / Pexels

The automation market is crowded. Before diving into setup, here’s a clear-eyed look at why n8n stands out compared to popular alternatives like Zapier and Make.

🔓

100% Open Source

Fork it, modify it, self-host it. Full control over your automation infrastructure and data.

💰

Free to Self-Host

Run unlimited workflows, unlimited executions — completely free on your own server. No task limits.

400+ Native Nodes

Gmail, Slack, Notion, Airtable, Stripe, PostgreSQL, HTTP Request, and hundreds more — built in.

🧠

Code When Needed

Drop a JavaScript or Python node anywhere in your workflow for complex transformations.

🔀

Complex Logic

Branches, loops, merges, sub-workflows, error paths — n8n handles enterprise-grade logic.

🔒

Data Privacy

Your data never leaves your server. Critical for GDPR compliance and sensitive business data.

Here’s a direct comparison to help you make an informed choice:

Feature n8n (Self-hosted) Zapier Make (Integromat)
Price Free (self-hosted) From $19.99/mo From $9/mo
Task Limits ✓ Unlimited ✗ Capped per plan ✗ Capped per plan
Open Source ✓ Yes ✗ No ✗ No
Custom Code ✓ JS + Python Limited (Code step) Limited
Self-hostable ✓ Yes ✗ No ✗ No
Data Privacy ✓ On your servers Zapier’s servers Make’s servers
Complex Workflows ✓ Full branching Limited Good

3. Prerequisites

3. Prerequisites

Photo: Yaroslav Shuraev / Pexels

Before installing n8n, make sure you have the following ready. Don’t worry if you’re not a developer — we’ll walk through everything.

ℹ️
For the Easiest Start

If you just want to try n8n without any installation, sign up for n8n Cloud at n8n.io. It offers a free trial and handles all the infrastructure for you. Skip to Section 5 to jump straight to the interface.

For Self-Hosted Installation

  • A computer or server running Linux, macOS, or Windows
  • Node.js v18 or later (for npm installation)
  • Docker (recommended for the easiest setup)
  • Basic comfort with a terminal/command line
  • At least 1 GB of RAM (2 GB recommended)

General Requirements

  • Accounts for the services you want to connect (e.g., Gmail, Slack)
  • API keys or OAuth credentials for those services (we’ll cover this)
  • A modern web browser (Chrome, Firefox, Edge, or Safari)

4. Installing n8n

4. Installing n8n

Photo: Warshu Media concept / Pexels

There are three main ways to run n8n. We’ll cover all three so you can choose what fits your situation best.

Option A: n8n Cloud (Easiest — No Setup Required)

The simplest way to get started is n8n’s hosted cloud service. Go to n8n.io, click Get Started, and create an account. Your n8n instance will be ready in under 60 seconds. This is perfect for trying n8n or running a small number of workflows without managing a server.

Option B: Docker (Recommended for Self-Hosting)

Docker is the most reliable way to run n8n on your own machine or server. If you don’t have Docker installed, download it from docker.com first.

Once Docker is running, open your terminal and run:

Terminal — Docker Quick Start
# Pull and run n8n with Docker
docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

That’s it. n8n will be available at http://localhost:5678 in your browser. Your workflow data is saved to ~/.n8n on your machine, so it persists between container restarts.

Tip: Run in the Background

Add the -d flag to run n8n as a background daemon: docker run -d --name n8n -p 5678:5678 ...

Option C: npm (For Node.js Developers)

If you have Node.js installed, you can run n8n directly via npm:

Terminal — npm Installation
# Install n8n globally
npm install n8n -g

# Start n8n
n8n start

# Or start with a tunnel (useful for webhooks during development)
n8n start --tunnel

After running either command, open http://localhost:5678 in your browser. You’ll be greeted with the n8n owner setup screen.

First-Time Account Setup

On your first visit, n8n will prompt you to create an owner account. Fill in your name, email, and password. This becomes the administrator account for your n8n instance. Once registered, you’ll land on the n8n dashboard and you’re ready to build.

5. Understanding the n8n Interface

5. Understanding the n8n Interface

Photo: Ann H / Pexels

Before building anything, let’s orient ourselves. The n8n interface is clean and intuitive once you understand its key sections.

localhost:5678 n8n 📋 Workflows 🔑 Credentials ⚙️ Settings 🧩 Templates ① SIDEBAR NAVIGATION My First Workflow ▶ Execute 💾 Save ② WORKFLOW TOOLBAR ⚡ TRIGGER Gmail On New Email ⚙️ ACTION Slack Send Message + ③ CANVAS — Drag nodes here to build workflows ④ EXECUTION LOG — View run history, debug errors, and inspect node outputs here

Figure 2 — The n8n interface: sidebar navigation, workflow toolbar, visual canvas, and execution log.

The four key areas of the n8n interface are:

  • ① Sidebar Navigation — Access your Workflows, Credentials (API keys), Settings, and the Template library.
  • ② Workflow Toolbar — Name your workflow, save it, execute it manually, and toggle it active/inactive.
  • ③ Canvas — The visual workspace where you drag, drop, and connect nodes. Click the + button or anywhere on the canvas to add a new node.
  • ④ Execution Log — After running a workflow, view each node’s input/output data, debug errors, and see execution history.

6. Core Concepts: Nodes, Triggers & Workflows

6. Core Concepts: Nodes, Triggers & Workflows

Photo: Cup of Couple / Pexels

Before building your first workflow, you need to understand three fundamental concepts in n8n. These are the building blocks of everything you’ll create.

Workflows

A workflow is a complete automation sequence — a set of connected nodes that define what happens, in what order, under what conditions. Think of a workflow like a recipe: it has a starting event, a series of steps, and a final outcome. You can have as many workflows as you need.

Nodes

A node is a single step or action in a workflow. Every node does one thing — fetch data from an API, filter a list, send an email, transform a value, or write to a database. Nodes are connected by arrows, and data flows from one node to the next. n8n has three main categories of nodes:

  • Trigger Nodes — Start the workflow when something happens (e.g., a new email arrives, a webhook fires, a schedule runs).
  • Regular/Action Nodes — Perform operations: get, create, update, or delete data in any connected service.
  • Core Nodes — Special utility nodes like IF (condition), Switch, Merge, Loop, Code, HTTP Request, and more.
⚡ TRIGGER NODES Start your workflow Schedule · Webhook Gmail · Slack · etc. ⚙️ ACTION NODES Do something Send email · Post to Slack Update DB · Create record 🔧 CORE NODES Control the flow IF · Switch · Loop Merge · Code · HTTP

Figure 3 — The three types of nodes in n8n: Trigger, Action, and Core nodes.

Triggers

A trigger is the event that starts your workflow. Every workflow must begin with exactly one trigger node. Common triggers include:

  • Schedule Trigger — Run at a specific time (every hour, every day at 9am, every Monday, etc.)
  • Webhook Trigger — Fire when a POST/GET request hits a unique URL n8n generates for you
  • App Triggers — Gmail (new email), Slack (new message), Airtable (new record), Stripe (new payment), and hundreds more
  • Manual Trigger — Run by clicking the “Execute Workflow” button — perfect for testing

7. Building Your First Workflow — Step by Step

7. Building Your First Workflow — Step by Step

Photo: Steve Johnson / Pexels

Now the fun part. We’re going to build a real, working automation from scratch: When a new email arrives in Gmail, automatically post a formatted notification to a Slack channel.

This is one of the most popular starter automations because it’s practical, easy to understand, and demonstrates all the key n8n concepts in one workflow.

📧 GMAIL Trigger: New Email Received 🔧 IF NODE Filter: Subject contains keyword ✏️ SET NODE Format the Slack message 💬 SLACK Action: Send Message

Figure 4 — The complete workflow we’re building: Gmail → IF filter → Set node → Slack.

1

Create a New Workflow

In n8n’s sidebar, click Workflows, then hit the + New Workflow button in the top-right corner. Click on the default name “My workflow” at the top to rename it to something descriptive — for example, “Email to Slack Notifier”. Then click Save. You’ll see a blank canvas ready for building.

2

Add the Gmail Trigger Node

Click the large + button on the canvas (or press Tab) to open the node picker. Search for “Gmail” and select the Gmail Trigger node. In the right panel, set the Event to Message Received. Then click Create New Credential to connect your Gmail account via OAuth. Follow the prompts to authorize n8n to read your emails. Once connected, click Save in the node panel.

3

Add an IF Node to Filter Emails

Click the output dot on the right side of the Gmail node (the small circle), then drag to the canvas and release — the node picker will appear. Select IF from the Core nodes. In the IF node panel, set the condition: Value 1 = {{ "{{" }}$json.subject{{ "}}" }}, Operation = Contains, Value 2 = the keyword you want to filter for (e.g., “Invoice”). This way, only emails with “Invoice” in the subject will trigger the Slack notification.

4

Add a Set Node to Format the Message

Connect from the True output of the IF node (the green branch) and add a Set node. This node lets you compose your Slack message. Add a field called slackMessage with this value: 📧 New Invoice Email from {{ "{{" }}$json.from{{ "}}" }}: {{ "{{" }}$json.subject{{ "}}" }}. This pulls the sender name and subject from the Gmail data and formats them into a readable message.

5

Add the Slack Action Node

Connect from the Set node and add a Slack node. Set the Resource to Message and Operation to Send. Connect your Slack account via OAuth (click Create New Credential → authorize in the popup). Set Channel to the Slack channel you want to post in (e.g., #alerts), and set Text to {{ "{{" }}$json.slackMessage{{ "}}" }} to use the message you formatted in the previous step.

⚠️
About n8n Expressions

The double-curly-brace syntax {{ "{{" }} $json.fieldName {{ "}}" }} is n8n’s expression language for referencing data from previous nodes. Use it to make your nodes dynamic. You can browse available variables by clicking the icon next to any input field.

8. Connecting External Services (Credentials)

8. Connecting External Services (Credentials)

Photo: Ann H / Pexels

One of the most important concepts in n8n is credentials — the API keys, OAuth tokens, and passwords that allow n8n to talk to external services on your behalf. n8n stores these securely and lets you reuse them across multiple workflows.

OAuth Credentials (Gmail, Slack, Google Sheets, etc.)

For services that use OAuth (the “Sign in with Google” style authorization), n8n handles the flow automatically. When you click Create New Credential inside a node, a popup window will open, you’ll log in to the service, grant n8n permission, and the credential is saved. You’ll never need to handle OAuth tokens manually.

API Key Credentials

For services that use API keys (like OpenAI, Stripe, Twilio, etc.), the process is:

  1. Go to the service’s developer dashboard and generate an API key.
  2. In n8n, go to Credentials in the sidebar → + Add Credential.
  3. Search for the service, select its credential type, paste your API key, and click Save.
Example — OpenAI API Credential
{
  "name": "OpenAI Production",
  "type": "openAiApi",
  "data": {
    "apiKey": "sk-proj-••••••••••••••••••••••••••••••"
  }
}
🔒
Your Credentials Are Encrypted

n8n encrypts all credentials at rest using AES-256 encryption. The encryption key is unique to your n8n instance. Even if someone accessed your n8n database, they couldn’t read your API keys without the encryption key.

9. Testing & Debugging Your Workflow

9. Testing & Debugging Your Workflow

Photo: Shamia Casiano / Pexels

Once your workflow is built, it’s time to test it. n8n has excellent built-in debugging tools that make it easy to identify and fix issues before going live.

Manual Test Execution

Click the ▶ Execute Workflow button in the top toolbar. n8n will run the entire workflow from the trigger node. If you’re using a Gmail trigger, you may need to send yourself a test email first and then poll for new messages using the Fetch Test Event button in the trigger node.

Inspecting Node Output

After execution, click on any node in your workflow. You’ll see the Input and Output tabs at the bottom of the screen, showing you exactly what data entered and exited that node in JSON format. This is invaluable for debugging — you can see precisely what fields are available to reference in subsequent nodes.

INPUT OUTPUT // Gmail Trigger Output — 1 item { “from” : [email protected] “subject” : “Invoice #1042 — Due Friday” “body” : “Please find your invoice attached…” }

Figure 5 — The node execution panel showing the exact JSON output from the Gmail Trigger node — use these field names in subsequent node expressions.

Common Issues & Fixes

  • Node shows red error badge — Click the node to see the error message. Usually it’s a missing credential, a wrong field name, or an API rate limit.
  • IF node sends all items to False branch — Double-check your condition. Use the expression {{ "{{" }}$json.subject{{ "}}" }} and make sure the field name matches exactly what the previous node outputs.
  • Slack message not appearing — Verify the channel name includes the # prefix and that your Slack credential has permission to post to that channel.
  • Workflow doesn’t trigger automatically — The workflow must be set to Active in the toolbar. Test executions use manual mode, but live triggers require activation.

10. Activating & Monitoring Your Workflow

10. Activating & Monitoring Your Workflow

Photo: Monstera Production / Pexels

Once you’ve tested your workflow and everything works, it’s time to activate it for real-world use.

Activating the Workflow

In the top toolbar, find the Active toggle switch (it will show as gray/inactive when in test mode). Click it to turn it green. n8n will confirm the workflow is now live. From this point, the workflow runs automatically in the background every time the trigger fires — no manual clicking required.

💡
Polling vs. Webhooks

Some triggers like Gmail use polling — n8n checks for new emails at a set interval (default: every minute). Others, like the Webhook node, respond instantly to real-time events. For time-sensitive automations, webhook-based triggers are faster.

Monitoring Executions

Go to the Executions tab on any workflow to see a full history of every time the workflow ran, whether it succeeded or failed, how long it took, and what data it processed. You can click any execution entry to inspect the data that flowed through each node at that specific moment — perfect for investigating issues after the fact.

Setting Up Error Notifications

In your workflow, add an Error Trigger node as a separate workflow that fires whenever any other workflow in your n8n instance encounters an unhandled error. Connect it to a Slack or email node to get notified immediately when something breaks.

11. Real-World n8n Use Cases

11. Real-World n8n Use Cases

Photo: Thành Đỗ / Pexels

Once you’ve mastered the basics, the possibilities are nearly limitless. Here are some of the most popular and impactful automation workflows people build with n8n.

📊

Daily Business Reports

Every morning at 8am, pull data from Stripe, PostgreSQL, and Google Analytics, format a summary, and email it to your team.

🛒

E-Commerce Order Processing

When a new Shopify order comes in, add the customer to a CRM, update your inventory sheet, and send a personalized confirmation email.

🤖

AI-Powered Support

Route incoming support tickets from email to OpenAI for classification and auto-reply drafting, then post to your team’s Slack.

📅

Meeting Preparation

Every weekday at 7am, check your Google Calendar for the day’s meetings, pull notes from Notion, and send a brief to your phone.

💰

Invoice Automation

When a project is marked complete in Asana, automatically generate an invoice in QuickBooks and email it to the client.

📱

Social Media Scheduling

Read from a Google Sheet of scheduled posts and automatically publish them to Twitter/X, LinkedIn, and Instagram at the right time.

🔔

Website Uptime Alerts

Every 5 minutes, ping your website. If it returns anything other than a 200 status, immediately send an SMS and Slack alert.

📂

Lead Management

Capture form submissions from Typeform, enrich the data with Clearbit, add the lead to HubSpot, and notify the sales team on Slack.

12. Best Practices & Pro Tips

12. Best Practices & Pro Tips

Photo: Brett Jordan / Pexels

As you build more workflows, these practices will save you time, prevent headaches, and keep your automation infrastructure maintainable.

Name Everything Clearly

Give every workflow, node, and credential a descriptive name. “Gmail Trigger” is fine for a tutorial, but in production, “Invoice Email Trigger” makes it instantly clear what the workflow does. You’ll thank yourself when managing 50+ workflows.

Use the Set Node for Data Transformation

Instead of writing complex expressions directly inside action nodes, use a Set node beforehand to prepare and rename data into clean, meaningful fields. This makes your workflow much easier to read and debug.

Add Error Handling to Every Workflow

For production workflows, always add an error handler. In n8n, you can right-click any node, select Settings, and define what happens on error — continue silently, stop the workflow, or route to a special error path. At a minimum, set up a global Error Trigger workflow that sends you an alert.

Use Sub-Workflows to Avoid Repetition

If you find yourself rebuilding the same logic in multiple workflows (like a Slack notification formatter), extract it into a reusable sub-workflow. Call it with the Execute Workflow node from any parent workflow — this keeps your automations DRY and maintainable.

Limit Execution History Retention

High-frequency workflows (like one running every minute) will accumulate thousands of execution records quickly. In Settings → Log pruning, set a data retention period to keep your n8n database from growing too large.

Test with the Manual Trigger First

When building a new workflow, start with a Manual Trigger node instead of a live app trigger. This lets you run the workflow on demand with test data until everything works, then swap in the real trigger at the end.

🚀
Pro Tip: Use the n8n Template Library

Before building from scratch, check the n8n Template Library at n8n.io/workflows. There are thousands of ready-made workflow templates covering almost every common use case. Import a template with one click and customize it to your needs — it’s the fastest way to get started.

13. Conclusion

You’ve now covered everything you need to go from zero to a running n8n automation — understanding what n8n is, installing it, navigating the interface, learning the core concepts, building a complete workflow step by step, and following best practices for production use.

n8n’s power lies in its flexibility. Whether you’re a developer who wants to write custom JavaScript transformations, a business owner automating repetitive tasks, or a team looking for a self-hosted alternative to expensive SaaS automation tools, n8n has you covered. The most important step is always the first one — building that initial workflow.

Start simple. Get one workflow running. Then gradually expand: add more nodes, connect more services, introduce conditional logic, and explore n8n’s AI nodes for building LLM-powered automation agents. Every hour you invest in learning n8n today will save you hundreds of hours of manual work in the months to come.

🎉
Your Next Steps

✅ Install n8n (Docker command above) · ✅ Build the Gmail-to-Slack workflow · ✅ Explore the Template Library · ✅ Join the n8n community at community.n8n.io

KT
Kedarinath Talisetty
Automation Consultant & Founder · AI Tool Clinic
Kedarinath Talisetty specializes in helping businesses automate their workflows using tools like n8n, Make, and custom API integrations. Follow along at aitoolclinic.com for more deep-dive automation tutorials.
K
Kedarinath Talisetty
CCDM® Certified · Clinical Data & AI Specialist
12+ years in clinical data management. Reviews AI tools through an evidence-based clinical lens to help healthcare professionals and businesses make informed decisions.