# n8n Tutorial (2026): Build Your First Workflow, Step by Step

> A hands-on n8n tutorial for 2026: install (free self-host or Cloud trial), the interface, build and test your first workflow node-by-node, master data & expressions, add logic, error handling and your first AI step.

_Source: https://professionalstoolkit.com/articles/n8n-tutorial — The Professional's Toolkit · updated 2026-07-29_

---

> **TL;DR —** This is a hands-on n8n tutorial: from choosing how to run it (free self-hosted or the 14-day Cloud trial), through the interface, building and testing your first real workflow node-by-node, working with data and expressions (the one thing beginners trip on), adding logic and error handling, activating it, and dropping in your first AI step. By the end you'll have a working automation and — more importantly — the mental model to build your own. n8n rewards a little upfront learning with a ceiling most tools never reach.

## What you'll build

To make this concrete, we'll build a genuinely useful first workflow: **when a new row is added to a spreadsheet (a lead), send a Slack message to your team and add the lead to a second sheet as a clean record.** It uses a trigger, two actions, a little data mapping and a test cycle — the same shape as almost everything you'll build later.

## Step 0 — choose how to run n8n

n8n runs two ways, and either is free to start:

- **Self-hosted (free):** the fastest route is Docker — one command gets you a running instance on your own machine or a small server. Best if you have technical capacity and want unlimited executions and full data control. For anything beyond a trial, use a Postgres database rather than the default SQLite.
- **n8n Cloud (14-day free trial, no card):** nothing to install — sign up and you're in the editor. Best if you'd rather not run infrastructure while you learn.

For this tutorial either works identically; the editor is the same. If you're evaluating, the Cloud trial is the quickest way to follow along.

## The interface, in 60 seconds

Three things make up the n8n editor:

- **The canvas** — the center, where your workflow lives as connected **nodes**. Each node is a step; arrows show data flowing left to right.
- **The nodes panel** — press **Tab** or click the **+** to search 400+ integrations plus core nodes (HTTP, Code, IF, Switch, Set).
- **The execution view** — after you run a workflow (or a single node), each node shows the data it produced. This panel is where you'll spend most of your debugging time, so get comfortable opening a node and reading its output.

## Connect your accounts — credentials

Before a node can touch Slack or Google Sheets, you authorize the account once as a **credential**, and every workflow reuses it. When you add a node, click to create a new credential and follow the connect flow (usually OAuth — a login popup — or an API key you paste). Two things worth knowing as a beginner: credentials are stored encrypted and separately from workflows, so you can share or export a workflow without leaking secrets; and if you're self-hosting, the encryption key that protects them is generated on first run — **back it up on day one**, because restoring without it makes every saved credential unreadable. Set a credential up once, and it's available to every node that uses that app.

## Build your first workflow, node by node

1. **Add the trigger.** Click **+**, search your spreadsheet app (e.g. Google Sheets), and pick the "row added" trigger. Connect your account (a one-time credential you'll reuse), choose the sheet, and **fetch a test event** so you have real data to work with — always build against real data, never guesswork.
2. **Add the Slack action.** Click the **+** to the right of the trigger, search Slack, choose "send message," connect Slack, and pick a channel.
3. **Map the data.** In the message field, instead of typing a static string, pull in values from the trigger. This is the core skill — covered next.
4. **Add the second action.** Add another Google Sheets node set to "append row," and map the lead's fields into the clean record sheet.

You now have trigger → Slack → Sheets. Three nodes, a real automation.

## Working with data — expressions and the data-mapping model

This is the concept that separates people who "get" n8n from those who bounce off it, so slow down here. Every node outputs **data items** (usually JSON), and the next node can reference any field from any earlier node using an **expression**. In practice you drag a field from the input panel into a parameter, and n8n writes the expression for you — something like `{{ $json.name }}` meaning "the `name` field from the incoming item." You can reference earlier nodes by name, transform values inline (upper-case, format a date, do math), and combine fields.

The mental model to hold: **data flows as items, and expressions read fields off those items.** Once that clicks, the whole tool opens up. A few examples you'll use constantly:

- `{{ $json.email }}` — the `email` field from the incoming item.
- `{{ $json.first_name }} {{ $json.last_name }}` — combine two fields into one string.
- `{{ $json.name.toUpperCase() }}` — transform a value inline (JavaScript methods work).
- `{{ $('Google Sheets').item.json.total }}` — pull a field from a *specific earlier node* by name, not just the immediate one.
- `{{ new Date().toISOString() }}` — insert a timestamp.

When you're unsure what a field is called, open the previous node's output in the execution view and look — don't guess. And if you need to reshape data (rename fields, add computed values) before an action, the **Edit Fields (Set)** node is the clean place to do it.

## Don't start from scratch — templates and core nodes

Two shortcuts every beginner should know. First, **templates**: n8n has a large library of pre-built workflows for common tasks — search it before building, import the closest match, and adapt it. Learning by editing a working template is far faster than starting on a blank canvas. Second, a handful of **core nodes** solve most problems regardless of app:

- **HTTP Request** — call any API, even one without a dedicated node. This is how you reach the ~anything that isn't in the 400+ integrations.
- **Edit Fields (Set)** — build or reshape the data items passed downstream.
- **IF / Switch / Filter** — the logic nodes (below).
- **Code** — JavaScript or Python when you need it.
- **Merge** — combine data from two branches back into one.

Knowing these five means you're rarely stuck just because an app lacks a dedicated node.

## Test as you build — the execution view is your friend

Don't build the whole workflow and hope. After each node, click **Execute node** (or **Execute workflow**) and read the output. n8n shows exactly what each node received and produced, so when something's wrong you can see *where*. The single most common beginner confusion — a node showing empty output — almost always means the data shape from the previous node isn't what you assumed; open that previous node and check the field names. Testing node-by-node turns debugging from guesswork into reading.

## Add logic — filters, IF and Switch

Real workflows branch. Two core nodes:

- **IF / Filter** — only continue when a condition is met (e.g. lead value over a threshold, or a field isn't empty). A Filter simply stops items that don't match; an IF sends true/false down two paths.
- **Switch** — route items down several paths by a value (e.g. region or category), each with its own downstream actions.

Add a Filter before your Slack node to skip test or junk rows, and you've just made the workflow production-sensible.

## Activate and schedule

A workflow only runs automatically once you **activate** it with the toggle at the top. Trigger-based workflows (like our "row added") then fire on their event. For time-based automations, use the **Schedule trigger** and set the interval — but set it to real need: a workflow polling every minute runs ~43,000 times a month, which matters on Cloud's execution meter (it's free on self-hosted). Until you activate, you're in build-and-test mode, which is exactly where you want to be while learning.

**A quick second example — a scheduled digest.** To feel the difference between event- and time-based triggers, build a second tiny workflow: a **Schedule trigger** set to "every weekday at 9am," then a Google Sheets node that reads yesterday's new leads, then a Slack node that posts the count to your team. No external event starts it — the clock does. Activate it, and every morning your team gets an automatic summary. That's the other half of automation: not just reacting to events, but running work on a rhythm. Between "on event" and "on schedule," you can express the large majority of real business automations.

## Handle errors before they bite

Production workflows fail sometimes — an API is down, a field is missing. Two safety nets:

- **Retries** — on a node's settings, enable retry-on-fail for flaky external calls, so a transient error doesn't kill the run.
- **An error workflow** — build a separate workflow triggered by errors that alerts you (a Slack message, an email) when any workflow fails. Set it once and every automation you build gets a safety net. This is the difference between "it broke and nobody noticed for a week" and "we knew in a minute."

## Add your first AI step

Once the basics click, AI is a natural next node. Drop an AI node into the flow — for example, before appending the lead, have it classify intent or clean up the message text — and connect your own model (OpenAI, Anthropic, or a self-hosted one). Because you bring your own key, you control the model and cost. For agents, RAG and the deeper patterns, see our dedicated [n8n AI playbook](/articles/n8n-ai-playbook); for now, know that adding AI is just adding another node.

## Beginner pitfalls to avoid

**Building without real data.** Always fetch a real trigger sample first and map from it, or you'll map fields that don't exist. **Guessing field names.** Open the previous node's output and read them. **Skipping tests.** Execute node-by-node; don't build ten nodes then wonder why the end is empty. **Over-frequent schedules.** Match the interval to need, especially on Cloud. **Forgetting to activate.** A saved workflow doesn't run until the toggle is on. **(Self-hosting) not saving the encryption key.** n8n encrypts credentials with a key generated on first run — back it up day one, or a rebuild loses every credential.

## Where to go next

You now have the shape of every n8n workflow: trigger, data, logic, actions, tested as you go. From here, add a second automation, introduce an AI node, and — if you're self-hosting for real — set up backups and (at higher volume) queue mode. To weigh whether n8n is right for you, read our [n8n review](/articles/n8n-review); to plan cost, see the [pricing guide](/articles/n8n-pricing); to build serious AI, the [AI playbook](/articles/n8n-ai-playbook) picks up where this leaves off.

## References

[1] n8n — docs (editor, nodes, expressions) — https://docs.n8n.io/ (2026-07)
[2] n8n — hosting & self-hosting docs — https://docs.n8n.io/hosting/ (2026-07)
