Building your first workflow in n8n: a webhook-triggered workflow with an email action from scratch in the visual editor, mapping data between nodes, running executions with test payloads, debugging via node output, and understanding execution history to audit results.

In episode 3 your n8n instance is alive. Now it's time for the biggest milestone of this series: building your first workflow from scratch.
This episode walks you through creating a simple workflow triggered by a webhook that sends an email — two of the most basic concepts you'll keep using. We'll also learn how to save and execute workflows, debug via node output, and read execution history to audit what happened.
Before touching the editor, plan the goal first. Our workflow will:
This is a classic automation pattern: one event comes in, one automatic action goes out. The data we need in the payload:
{
"nama": "Arief",
"email": "arief@example.com",
"produk": "Meja Belajar",
"total": 1250000
}With this plan, we know exactly what nodes are needed: Webhook at the start and Email at the end.
Open the dashboard, click Create Workflow, and name it for example notifikasi-pesanan. Now:
Webhook node onto the canvas. Configure the HTTP method as POST. n8n will display two URLs: test and production. Note the test URL for the debugging stage.Email node below-right of the webhook. Choose the Send Email resource.For now you can configure the email node with static data, since we'll map the payload data in the next section. A view of these two connected nodes is already enough for a first workflow.
The most important part: making the email use the data coming from the webhook. In n8n, this is done with expressions — short code that reads fields from an item. To read payload fields, click the fx icon on the To, Subject, and Text fields, then fill in the expressions:
{
"to": "{{ $json.email }}",
"subject": "Pesanan baru dari {{ $json.nama }}",
"text": "Terima kasih, {{ $json.nama }}! Pesanan {{ $json.produk }} sebesar {{ $json.total }} sedang diproses."
}Expressions like these open with two curly braces and read fields from the current item. The preview panel will display the result live — if the payload contains nama = Arief, the To field automatically becomes arief@example.com.
There are two ways to run a workflow in n8n:
Webhook node has a test URL at the /webhook-test/... path; while the workflow is in test mode, incoming requests immediately trigger an execution./webhook/... path and only runs when the workflow is activated.To test the test webhook, send a request from the terminal. If you're not sure curl is available on your machine, check first with curl --version:
curl -X POST http://localhost:5678/webhook-test/notifikasi-pesanan \
-H "Content-Type: application/json" \
-d '{"nama":"Arief","email":"arief@example.com","produk":"Meja Belajar","total":1250000}'If everything is connected correctly, the workflow executes and the email is sent (or recorded in the Email node on a local email setup).
When something goes wrong, don't guess — inspect the node output. Click the suspicious node, then open the Output tab. There you'll see exactly what data came out of that node:
Webhook node's output.email field there? Check whether the key in the JSON matches your expressions.One debugging habit you should build: run Execute Node on a single node to see the intermediate result without executing the whole workflow. This speeds up finding the problem spot.
Additionally, use the Expression Editor panel on each field — there you can type an expression and see a live preview of the result based on existing data, before the workflow is actually run. Combining expression previews and node output makes the trial-and-error cycle much shorter.
Every time a workflow runs — from test or production — n8n saves an execution record. Open the Executions menu to see the history:
Execution history is your automation's audit trail. When a scheduled workflow fails in the middle of the night, you can open its execution and see which node had a problem and what data was being processed.
Info
Always give workflows and nodes clear names, e.g. webhook-pesanan-masuk and kirim-email-konfirmasi. Good names make execution history far easier to read and search.
This episode trained you to build a first workflow end-to-end: designing requirements, arranging webhook and email nodes on the canvas, mapping payload data with expressions, running both test and production, debugging via node output, and reading execution history for auditing.
Key takeaways:
/webhook-test/ URL, production uses /webhook/ and requires the workflow to be active.Output is the primary debugging tool — look at the data, don't guess.In the next episode, we'll break down the source of triggers in depth: triggers and event sources — the types of webhook, cron, polling, and event-based triggers, secure webhook configuration, and how to trigger workflows from cloud services and API integrations. See you there!