š¢ Beginnerās Guide to n8n Automation
Build a āWeather Data Every Minuteā Workflow (with & without Docker)
Automation can save hours of manual workābut coding full-blown services is daunting if youāre new to development.
n8n changes that by letting you drag, drop, and connect nodes to create workflows visually.
In this guide youāll learn:
What n8n is and why itās useful
How to install n8n two ways: with Docker and without Docker
How to import and run a sample workflow that generates random weather data every minute
How each node in the workflow works
Extra ideas to help you create your own automations
Letās get started!
1ļøā£ What Is n8n?
n8n (pronounced ān-eight-nā) is an open-source automation platform.
Think of it like a programmable version of tools such as Zapier or IFTTT:
Visual builder ā create flows by connecting nodes instead of writing boilerplate code.
Over 350 ready-made nodes ā HTTP requests, Slack, Google Sheets, Databases, GitHub, and many more.
Self-hosted or cloud ā run on your own server for full control.
2ļøā£ Install n8n
You can run n8n either inside a Docker container (simple and portable) or directly on your system (no Docker needed).
Pick the method you prefer.
A. Install with Docker (Recommended)
Create a folder for n8n:
mkdir n8n && cd n8ndocker-compose.yml:
version: "3.9" services: n8n: image: n8nio/n8n ports: - "5678:5678" environment: - N8N_BASIC_AUTH_ACTIVE=true - N8N_BASIC_AUTH_USER=admin - N8N_BASIC_AUTH_PASSWORD=strongpassword - TZ=Asia/Kolkata volumes: - ./n8n_data:/home/node/.n8nStart it:
docker compose up -dVisit http://<your-server-ip>:5678 and log in with
admin / strongpassword.
B. Install without Docker (Native Node.js)
If youād rather skip Docker:
# Update packages
sudo apt update && sudo apt upgrade -y
# Install Node.js 18 or newer
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs build-essential
# Install n8n globally
sudo npm install -g n8n
Optional but recommended security:
export N8N_BASIC_AUTH_ACTIVE=true
export N8N_BASIC_AUTH_USER=admin
export N8N_BASIC_AUTH_PASSWORD=strongpassword
Run:
n8n
Open http://<your-server-ip>:5678 in a browser.
ā Tip: For production, create a systemd service so n8n starts automatically on reboot.
3ļøā£ Import the Weather Workflow
Download or copy the following JSON into a file called weather-workflow.json:
{
"name": "Weather Data Every Minute (Enhanced)",
"nodes": [
{
"parameters": {
"triggerTimes": [
{
"mode": "everyMinute"
}
]
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [150, 300]
},
{
"parameters": {
"values": {
"string": [
{
"name": "city",
"value": "London"
}
]
},
"options": {}
},
"name": "Set City",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [350, 300]
},
{
"parameters": {
"functionCode": "const conditions = ['Sunny', 'Cloudy', 'Rainy', 'Windy', 'Snowy'];\nreturn [{\n json: {\n city: $json.city,\n temperature: Math.floor(Math.random() * 16) + 15, // 15-30\n condition: conditions[Math.floor(Math.random() * conditions.length)],\n humidity: Math.floor(Math.random() * 41) + 40, // 40-80\n wind: Math.floor(Math.random() * 21) + 5 // 5-25\n }\n}];"
},
"name": "Random Weather",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [550, 300]
},
{
"parameters": {
"value": "={{$now}}",
"custom": true,
"toFormat": "yyyy-MM-dd HH:mm:ss",
"options": {}
},
"name": "Date & Time",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 1,
"position": [750, 300]
},
{
"parameters": {
"responseMode": "lastNode",
"options": {}
},
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [950, 300]
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "Set City",
"type": "main",
"index": 0
}
]
]
},
"Set City": {
"main": [
[
{
"node": "Random Weather",
"type": "main",
"index": 0
}
]
]
},
"Random Weather": {
"main": [
[
{
"node": "Date & Time",
"type": "main",
"index": 0
}
]
]
},
"Date & Time": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"active": false
}
Go to the n8n web interface.
Click Workflows ā Import from File.
Select the file and save.


4ļøā£ Understand the Nodes
Hereās what each node in Weather Data Every Minute (Enhanced) does:
| Node | What It Does | Why It Matters |
| Cron | Triggers the workflow every minute. | Acts as a schedulerāno manual clicks needed. |
| Set City | Adds a static city: "London" field. | Lets you define default data for downstream nodes. |
| Random Weather (Function) | Runs a small JavaScript snippet to create random temperature, condition, humidity, and wind. | Shows how to add custom logic beyond built-in nodes. |
| Date & Time | Adds the current timestamp formatted as YYYY-MM-DD HH:mm:ss. | Useful for logs or time-stamped records. |
| Respond to Webhook | Outputs the final JSON. | Lets other apps or people call the endpoint and get the data. |
When active, every minute this workflow generates output similar to:
{
"city": "London",
"temperature": 24,
"condition": "Sunny",
"humidity": 65,
"wind": 14,
"date": "2025-09-17 22:30:00"
}
5ļøā£ Test It
Activate the workflow (toggle in the top right).
Use curl or a browser to hit the test URL shown in the āRespond to Webhookā node:
curl http://<your-ip>:5678/webhook/<your-path>Youāll see fresh weather data each time you call it.
6ļøā£ Fun Extensions
This simple example is just the start.
Here are some beginner-friendly ideas:
Log to a Database ā Add a PostgreSQL or MySQL node to store each weather record.
Send Alerts ā Add an Email or Slack node to notify if the temperature crosses a threshold.
Google Sheets Dashboard ā Append each new data point to a sheet for easy charts.
Real API Calls ā Replace the Random Weather function with an HTTP Request node calling a real API such as OpenWeatherMap.
7ļøā£ Key Takeaways for Beginners
Visual First ā You donāt need to be a developer to start; drag-and-drop gets you far.
Two Easy Installs ā Docker for convenience, Node.js if you prefer native.
Reusable ā The same workflow can run locally, in the cloud, or on a Raspberry Pi.




