You've heard about n8n. Maybe you saw it on Reddit, watched a YouTube demo, or got sick of paying Zapier's monthly fee. Now you're ready to actually build something. This tutorial walks you through everything — from install to first working workflow — in plain language.
By the end of this post, you'll have a real, working automation: every new Gmail you receive gets logged automatically to a Google Sheet. No code, no theory — a live workflow you built yourself. Once you've done it once, the next one takes a fraction of the time.
Let's go.
What Is n8n?
n8n (pronounced "n-eight-n") is an open-source workflow automation tool. It lets you connect apps and automate tasks using a visual, node-based canvas — no code required. Think Zapier or Make.com, but with two big differences: you can self-host it for free, and there's no per-task pricing that scales against you.
Here's what makes it worth learning:
- Visual node editor — drag, drop, and connect apps on a canvas
- 500+ integrations — Gmail, Sheets, Slack, Notion, Airtable, Stripe, webhooks, and more
- Self-hostable — run it on your own server or laptop, pay nothing
- No task limits on self-hosted — run 10,000 automations a day if you want
- Active open-source community — thousands of free workflow templates
Best for: developers, technical marketers, ops teams, and solopreneurs who want automation power without per-task pricing eating into margins.
How to Get n8n Running
You have three options. Pick the one that fits your setup.
Option A: n8n Cloud (Recommended for This Tutorial)
Sign up at n8n.io. You get a 14-day free trial, no credit card required. Your instance is hosted and ready in under a minute — no setup, no terminal, no Docker.
This is the fastest way to follow along. Use it to learn the tool; self-host later if cost becomes a factor.
Option B: Self-Host with npm
If you have Node.js installed (version 18+), run this in your terminal:
npx n8n
That's it. n8n downloads and launches locally. Navigate to `http://localhost:5678` in your browser and you're in.
Works on Mac, Linux, and Windows. The downside: it only runs while your terminal is open. Fine for learning, not for production automations you want running 24/7.
Option C: Self-Host with Docker
If you have Docker installed:
docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n
This pulls the official n8n image and starts it locally. Navigate to `http://localhost:5678`. Same as Option B, but containerized — easier to manage, easy to stop and restart cleanly.
Featured in this article
ChatGPT Prompt Pack for Business
50 power prompts for every business use case
$19
Instant download. 30-day guarantee.
For this tutorial, use n8n Cloud to skip all the setup friction and focus on learning the tool.
Understanding n8n's Building Blocks
Before you build, get familiar with the five core concepts. Everything in n8n is built from these.
Nodes
A node is a single step in your workflow. Every node does one thing: trigger the workflow, fetch data, transform it, or send it somewhere. When you open the node library (click the `+` button on the canvas), you'll see nodes organized by category — Triggers, Actions, Core nodes, and app-specific integrations.
Three types to know:
- Trigger nodes — start the workflow (webhook received, schedule fired, new email arrived)
- Action nodes — do something (send an email, create a row, post to Slack)
- Transformation nodes — reshape data (Set node, Function node, IF node)
Connections
Connections are the arrows between nodes. They define data flow: the output of one node becomes the input of the next. Drag from the right edge of a node to the left edge of the next one to connect them. Data always flows left to right.
Triggers
Every workflow starts with a trigger — the event that kicks it off. Common triggers:
- Schedule — runs at a set time or interval (every hour, every Monday at 9am)
- Webhook — fires when an external service sends a POST request
- App event — fires when something happens in a connected app (new email, form submission, Stripe payment)
Without a trigger, a workflow can only run manually.
Credentials
Credentials are how n8n authenticates to your apps — OAuth tokens, API keys, or basic auth. You set them up once per app inside each node's configuration panel. n8n stores them encrypted and reuses them across workflows.
Executions
Every time a workflow runs, it creates an execution — a timestamped record of what happened, what data flowed through, and whether it succeeded or failed. Find them under the Executions tab. This is your debug log; when something breaks, start here.
With those five concepts in place, you're ready to build.
Build Your First Workflow: New Gmail → Save to Google Sheets
Here's what you're building: whenever a new email arrives in Gmail, n8n captures the subject, sender, and date, then appends a row to a Google Sheet. Useful on its own, and the foundation for dozens of more complex automations.
Step 1: Create a New Workflow
Open n8n and click New Workflow in the top right. You'll land on an empty canvas — a dark grid where you'll build. In the top left, click the pencil icon next to "My workflow" and rename it something like "Gmail to Sheets."
Step 2: Add the Gmail Trigger
Click the large `+` button in the center of the canvas (or the `+` button in the top toolbar) to open the node library. Search for Gmail and select the Gmail Trigger node.
The node configuration panel opens on the right side of the screen. You'll see:
- Credential to connect with — this is where you'll authenticate
- Resource — leave as "Message"
- Event — select "Message Received"
- Poll Times — set to "Every Minute" for this tutorial (once you understand the flow, you can slow this down to reduce API calls)
Step 3: Authenticate Your Google Account
Click Create new credential under the credential field. n8n will open an OAuth flow — click "Connect my account," follow the Google sign-in prompts, and grant the requested permissions.
Once authenticated, the credential name appears in the dropdown. n8n stores this securely; you won't need to re-authenticate.
Click Save in the node panel, then click Test step to verify the connection. n8n will poll your Gmail inbox and return sample email data — you'll see the JSON output in the panel showing fields like `subject`, `from`, `date`, and `snippet`.
Step 4: Add the Google Sheets Node
Click the `+` button on the right edge of the Gmail Trigger node to add the next step. Search for Google Sheets and select it. Then choose the Append Row action from the action dropdown.
In the configuration panel:
- Credential — either reuse your Google credential from step 3 (if it has Sheets scope) or create a new one
- Spreadsheet — click the field and select your target Google Sheet from the dropdown (n8n will list your recent Sheets)
- Sheet — select the specific tab (usually "Sheet1")
- Mapping Column Mode — select "Map Each Column Manually"
Step 5: Map the Fields
This is where you wire the Gmail data to your spreadsheet columns. Click Add field for each mapping:
- Column A → click the field, then click the lightning bolt icon (expressions) → select `Subject` from the Gmail output
- Column B → map to `From` (the sender's email address)
- Column C → map to `Date` (the received timestamp)
You'll see a preview of the mapped values populated with your test email data. If the columns look right, you're good.
In your Google Sheet, add header labels in row 1: `Subject`, `Sender`, `Date` — this keeps things readable as rows accumulate.
Step 6: Test the Workflow
Click Test Workflow (the play button in the toolbar). n8n will run the full flow — check Gmail for new messages, grab the data, and append a row to your Sheet.
Go open your Google Sheet. If a new row appeared with your email subject, sender, and date, the workflow works.
If it didn't run: check the Executions tab for error details. The most common issue is a credentials scope problem — re-authenticate with broader permissions and retry.
Step 7: Activate the Workflow
Once the test passes, click the Active toggle in the top right (it'll turn green). The workflow is now live — it polls Gmail every minute and logs new emails automatically.
That's it. Your first n8n workflow is running.
Featured in this article
ChatGPT Prompt Pack for Business
50 power prompts for every business use case
$19
Instant download. 30-day guarantee.
5 More n8n Workflows to Build Next
Now that you've done it once, here's what to build next. Each of these follows the same pattern: trigger → action.
1. Slack Message → Notion Task
Post a message to a designated Slack channel and n8n automatically creates a task in your Notion database with the message content as the task name. Eliminates the "I'll do it later" Slack graveyard.
2. Form Submission → CRM Contact
Connect a Typeform or Tally form to HubSpot or Airtable — every submission creates a new contact record automatically with all the form fields mapped. No more manually copying leads from your inbox.
3. Daily Digest Email
Set a Schedule Trigger for 8:00 AM every morning → pull items from 2–3 RSS feeds → use an n8n Set node to format the content → send yourself a summary email via Gmail. Your daily briefing, automated.
4. Stripe Payment → Google Sheets Row
Every successful Stripe charge triggers n8n via webhook → appends a row to a revenue tracker with the amount, customer email, product name, and timestamp. Your revenue log updates in real time, no manual entry.
5. Twitter/X Mentions Monitor
Set a Schedule Trigger to run every 30 minutes → query the Twitter/X API for your brand name or handle → if new mentions are found, send a Slack message with the tweet text and link. Never miss a mention that needs a response.
Get 10 Pre-Built n8n Workflows — Ready to Import
Skip the manual setup — get 10 ready-to-use n8n workflows pre-built and documented, ready to import.
[Get the n8n Automation Starter Kit — $27](https://madethis.com/checkout/stackd-store/md76qjfmk2e3xytpztp4e1tahn888ztx)
Each workflow includes the `.json` file (import directly into n8n in seconds), a step-by-step setup guide, and notes on what to customize for your use case.
Want automation ideas across Zapier and Make.com too? Browse all automation templates →
n8n has a learning curve — OAuth flows, expression syntax, and error handling all take some getting used to. But the payoff is massive: you own the tool, there's no per-task pricing, and the workflows run forever once they're set up.
The hardest part is the first one. You just built it.
From here, the patterns repeat. Trigger → action. Map the data. Test it. Activate it. Every automation you build from this point forward is a variation of what you just did — more nodes, more conditions, more complexity — but the same core logic.
Pick your next workflow from the list above and build it today while the pattern is still fresh. The automation habits that save you the most time are the ones you start before the weekend.