Lesson 9easy20 min
Building Your First Automation in n8n
Build an end-to-end workflow from scratch combining a manual trigger, data transformation, and external API call.
Learning Objectives
- Create a new workflow from an empty canvas
- Chain a Manual Trigger, Code Node, and HTTP Request Node
- Execute and inspect the workflow run
Building Your First Automation in n8n
Let us build your first workflow to cement the core concepts: a pipeline that generates a user payload, transforms it with JavaScript, and queries an external API.
Step 1: Add the Manual Trigger
- On a blank canvas, click Add first step.
- Search for When clicking 'Test workflow' (Manual Trigger).
Advertisement
Step 2: Add a Code Node
Add a Code node set to Run Once for All Items with the following script:
javascript
return [
{
json: {
userId: 42,
username: "antigravity_dev",
city: "San Francisco",
timestamp: new Date().toISOString()
}
}
];
Step 3: Add an HTTP Request Node
Connect an HTTP Request node to fetch mock data:
- Method:
GET - URL:
https://jsonplaceholder.typicode.com/todos/1 - Response Format: JSON
Click Test step. Inspect the output tab to verify that the HTTP response merged cleanly with your workflow data.