TheDigitalLab
Automation

How to Build Your First n8n Workflow (Step-by-Step)

AAzlani Abdelmoiz· Automation EngineerJul 29, 20268 min read

The fastest way to understand n8n is to build one small workflow end-to-end, not to read the whole feature list first. This walkthrough builds a real workflow — new form submission in, formatted notification out — so every concept shows up in context instead of as an abstract definition.

For the bigger picture of what n8n is and where it fits against alternatives, see our complete guide to n8n workflows.

Step 1: Set up your n8n instance

You have two paths in: n8n Cloud (hosted, paid after a free trial) or self-hosted (free, requires Docker or npm). For your first workflow, n8n Cloud removes the setup step entirely — sign up, and you land straight on a blank canvas. Self-hosting is worth doing once you know you'll keep using n8n; it's a single docker run command for a local instance, or a few extra steps for a persistent, publicly reachable one.

Either way, you land in the same place: an empty canvas with a plus button waiting for your first node.

Step 2: Choose a trigger node

Every workflow starts with a trigger — the event that wakes it up. The three you'll use constantly:

  • Manual Trigger — runs only when you click "Execute Workflow." Best for testing.
  • Schedule Trigger — runs on a cron-style interval (every hour, every morning at 9am).
  • Webhook Trigger — runs when an external service sends an HTTP request to a URL n8n generates for you.

For this walkthrough, add a Webhook Trigger. n8n generates a unique test URL immediately — copy it, you'll use it in the next step.

Step 3: Send it real data

n8n workflows are built and debugged against real payloads, not guesses about what the data might look like. Send a test request to your webhook URL — a simple JSON body works:

{ "name": "Jordan Lee", "email": "jordan@example.com", "message": "Interested in the automation pack" }

Once n8n receives it, click the webhook node and you'll see the exact payload structure under "Output." This matters more than it sounds — every node downstream references these exact field names, so seeing the real shape of your data before wiring the rest of the workflow saves you from broken references later.

Step 4: Add a transform step

Raw webhook data rarely arrives in the shape you want to send onward. Add a Set node (or Edit Fields in newer n8n versions) after the trigger to reshape the data — combine fields, add a timestamp, format a name.

Set node:
  fullName = {{$json.name}}
  receivedAt = {{$now}}
  summary = "New lead: {{$json.name}} ({{$json.email}})"

The {{ }} syntax is n8n's expression editor — it references fields from the previous node's output directly. This is the pattern you'll use in almost every node from here on: reference upstream data, transform it, pass it downstream.

Once you're comfortable with this pattern, most new workflows don't need to start from scratch — see where to find n8n workflow templates for tested starting points you can adapt instead.

Step 5: Add the action node

This is where the workflow actually does something. Search the node panel for the destination you want — Slack, email, Google Sheets, a CRM, or a generic HTTP Request node if there's no dedicated integration. Connect it to your Set node's output.

For a Slack notification, the Slack node needs three things: your credential (OAuth or a webhook URL), a channel, and a message — which you'll build from the fields your Set node produced:

Message: {{$json.summary}}

Step 6: Handle errors before they happen

A workflow that works once with test data and breaks on the tenth real submission isn't finished. Add an Error Trigger workflow (a separate workflow n8n calls automatically when any execution fails) or wire an IF node to check for missing fields before they reach your action node. The habit worth building early: assume the incoming data will eventually be malformed, and decide now what happens when it is — retry, notify, or drop and log. This is the first of 7 common n8n workflow mistakes worth knowing before you build much further.

Step 7: Activate and monitor

Toggle the workflow to "Active" in the top right, and swap your test webhook URL for the production one shown in the node. From here, every real request runs the full chain automatically. Check the Executions tab periodically — it logs every run, success or failure, with the full data at each step, which is the fastest way to debug a workflow that starts misbehaving weeks after you built it.

What to build next

Once this pattern clicks — trigger, transform, action, error handling — most new workflows are recombinations of the same four pieces pointed at different services. Rather than starting every new automation from a blank canvas, browse n8n workflow templates for a working starting point you can adapt to your own stack.

Build this with

More from the lab

View all posts →