Step-by-step tutorial to build your first n8n workflow from scratch, covering triggers, nodes, connections, and testing.
In this guide you will build a simple workflow that runs on a schedule, fetches data from a public API, and sends a notification. By the end you will understand how to create workflows, add and connect nodes, test executions, and activate a workflow for production use.
You need a running n8n instance. Choose whichever option suits you:
Sign up at app.n8n.cloud. The free trial gives you immediate access to the workflow editor -- no installation required.
Run n8n locally with a single command:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Once the container is running, open your browser and navigate to http://localhost:5678.
If you prefer Node.js directly:
npx n8n
This starts n8n on port 5678 by default.
Note
The Docker method persists your data in a named volume (
n8n_data). If you usenpx n8n, data is stored in~/.n8nby default.
Every workflow begins with a trigger -- an event that starts the execution.
Tip
During development you do not need to wait for the schedule. You can run the workflow manually at any time using the Test workflow button.
Next, add a node that retrieves data from a public API.
Click the + handle on the right side of the Schedule Trigger node.
Search for HTTP Request and select it.
Configure the node:
| Field | Value |
|---|---|
| Method | GET |
| URL | https://jsonplaceholder.typicode.com/posts/1 |
Click Test step to execute just this node. You should see a JSON response containing a sample post with userId, id, title, and body fields.
Now add a node to do something with the fetched data. For this example, use a simple Send Email or a messaging node. To keep things dependency-free, we will use the Set node to simulate an output, but you can substitute Slack, Discord, email, or any other notification node.
Click the + handle on the HTTP Request node.
Search for and add a Set node (or your preferred notification node).
In the Set node, add a field:
| Field Name | Value (expression) |
|---|---|
message |
New post fetched: {{ $json.title }} |
Click Test step. The output should show your message field populated with the post title from the API.
Info
Expressions in n8n use double curly braces
{{ }}. Inside them you can reference data from the current or previous nodes using$json,$node, and other built-in variables.
Click the Test workflow button in the top-right corner of the canvas. n8n will execute every node in sequence, starting from the Schedule Trigger. After the run completes:
Once you are satisfied that the workflow runs correctly:
The workflow is now live. The Schedule Trigger will fire at the interval you configured, and n8n will execute the workflow automatically each time.
Warning
On self-hosted instances, n8n must be running continuously for scheduled workflows to fire. If you started n8n with
docker run --rm, the container (and your workflows) will stop when you close the terminal. For persistent operation, usedocker run -dor a process manager.
In this guide you:
From here you can extend this workflow -- swap the Set node for a Slack or email node, add error handling, or chain additional processing steps. See Cloud vs. Self-Hosted to decide how you want to run n8n long-term.
For more workflow examples and tutorials, see the official n8n courses and documentation.
I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.