n8n is one of the most powerful automation tools available — and unlike other platforms, it gives you the full programming flexibility of JavaScript alongside a visual editor that actually makes sense. This tutorial walks you through creating your first real workflow from scratch: a scheduled job that fetches data from an API, processes it, and sends a Slack notification. No prior n8n experience needed.
A workflow that runs every morning at 8 AM, fetches the current weather for your city from a public API, formats a summary message, and sends it to your Slack channel. By the end, you'll understand every core n8n concept: triggers, HTTP requests, data manipulation, outputs, testing, and activation.
Understanding the n8n Interface
Before adding any nodes, take a few minutes to understand the n8n editor layout. Open your n8n instance and click "New Workflow."
The Canvas
The canvas is your visual workspace. It's an infinite grid where you drag, connect, and configure nodes. Key interactions:
- Pan: Click and drag on empty space, or hold Space and drag
- Zoom: Scroll wheel, or Ctrl/Cmd + scroll
- Fit to screen: Press Ctrl/Cmd + Shift + H
- Add a node: Click the + button on any node's right side, or double-click empty space
- Move a node: Click and drag the node itself
- Select multiple: Click and drag to create a selection rectangle
The top toolbar
From left to right in the top bar:
- Workflow name: Click to rename it. Use descriptive names like "Weather Alert — Daily Slack"
- Save: Ctrl/Cmd + S. n8n does not auto-save — save often
- Execute Workflow: Runs the entire workflow once manually (from the trigger)
- Active toggle: The on/off switch that makes trigger-based workflows run automatically
Node anatomy
Every node has the same structure: an input connector on the left, an output connector on the right, a name at the top, and a status indicator. Click any node to open its configuration panel on the right side of the screen.
Step 1 — Add a Schedule Trigger
Every workflow starts with a trigger. For our morning weather alert, we use the Schedule Trigger.
Add the Schedule Trigger node
Click the large "+" button in the center of the empty canvas. In the node search panel, type "Schedule" and select Schedule Trigger. It appears on the canvas as your starting node.
Configure the schedule
Click the Schedule Trigger node to open its settings. Change "Trigger Interval" to Days. Set the trigger time to 08:00. This runs the workflow every day at 8 AM in the timezone configured on your n8n instance.
To test a Schedule Trigger without waiting, click the node and press "Execute Step". This runs only that node and shows you what data it produces — a timestamp and trigger metadata. You'll use "Execute Step" throughout this tutorial to test each node independently.
Step 2 — Fetch Weather Data with HTTP Request
We'll use the Open-Meteo API — it's free, requires no API key, and returns JSON weather data. Click the + icon on the right side of the Schedule Trigger node to add the next node.
Add an HTTP Request node
Search for "HTTP Request" in the node panel and add it. This is the most versatile node in n8n — it can call any REST API.
Click "Execute Step" on this node. The right panel shows the raw JSON response — expand it to explore. You should see a current object with temperature_2m, weathercode, and windspeed_10m. This is the data we'll format in the next step.
Understanding node output structure
n8n passes data between nodes as an array of items. Each item has a json property containing the actual data. The HTTP Request node wraps the API response in this structure automatically. This is why you'll reference data as $json.current.temperature_2m — you're accessing the json property of the current item.
Step 3 — Process Data with the Edit Fields (Set) Node
The raw API response has more data than we need and uses machine-readable field names. The Edit Fields node (previously called "Set") lets us reshape and rename data into a clean structure for the Slack message.
Add an Edit Fields node
Add an "Edit Fields" node after the HTTP Request. Choose Manual Mapping mode and set "Include Other Input Fields" to off (we want a clean output with only what we define).
The last field uses a JavaScript ternary expression right inside the {{ }} expression syntax — this is one of n8n's most powerful features. Execute the node and verify you see a clean object with your 5 defined fields.
Step 4 — Send to Slack
Now the fun part — sending the formatted weather update to Slack.
Add a Slack node
Add a "Slack" node. You'll need to create a Slack credential. Click "Create new credential" → follow the OAuth flow to connect your Slack workspace. n8n stores the token encrypted.
If you don't have a Slack workspace, substitute this node with a Gmail node (send yourself an email) or a Webhook node (post to any endpoint). The data flowing into the final node is identical regardless of destination.
Using Slack Block Kit for richer messages
For a more visually appealing Slack message, use Block Kit JSON instead of plain text. Click "Add option" → "Blocks" in the Slack node and paste this:
Step 5 — Testing and Debugging
Before activating your workflow, test it thoroughly. n8n provides excellent debugging tools.
Run the full workflow manually
Click the "Execute Workflow" button in the top right toolbar. This runs all nodes from the trigger. Watch the green flow indicators move from left to right across the canvas as each node executes. Green = success, Red = error.
Inspect execution results
Click on any node after execution to see:
- Input tab: What data arrived from the previous node
- Output tab: What data this node produced and passed forward
- Error tab: Error message and stack trace if the node failed
Pinning data for iterative development
This is the most underused n8n feature for beginners. When testing, the Schedule Trigger fires immediately — but what about the HTTP Request? What if the API is slow or rate-limited?
Pin the output of the HTTP Request node: click the node, go to Output tab, click the pin icon next to any execution result. Now n8n uses that pinned data instead of making a real API call every time you test. This makes development much faster and avoids hitting rate limits.
Execution history
Go to the left sidebar → Executions. Every workflow run is saved here with timestamp, status, and full input/output data for every node. This is invaluable for debugging production issues — you can see exactly what data caused a failure hours or days later.
If a node fails, click on it and look at the Error tab. The error message almost always tells you exactly what went wrong — wrong URL, missing field, credential issue. n8n error messages are generally excellent — read them carefully before googling.
Step 6 — Adding Error Handling
Production workflows need error handling. Without it, a failed API call silently kills your workflow. Add a fallback path:
Add an Error Trigger
In the left panel, click "Add workflow" → look at the "Settings" tab of your workflow. Enable "Error Workflow" and select or create a separate error-handling workflow. That workflow receives error details and can send you an alert.
For simple error handling on a single node, right-click any node and select "Add Error Output". This adds a red error connector you can route to a different node (like a Slack alert or email):
Step 7 — Saving and Activating
Your workflow is complete. Two final steps:
Save the workflow
Press Ctrl/Cmd + S or click the Save button. Name it something meaningful: "🌤️ Morning Weather Slack Alert". Good names help when you have dozens of workflows.
Activate the workflow
Toggle the Active switch in the top-right corner from grey to green. The workflow is now live. It will run automatically at 8 AM every day. The toggle must remain green — if you edit and save, it stays active.
"Execute Workflow" runs the workflow once manually right now. "Active" means the trigger fires automatically on its own schedule. You need both — test manually, then activate for scheduled runs. A workflow can be tested without being activated.
Workflow Best Practices for Beginners
Naming conventions
- Use descriptive names: "Send Slack Alert on New HubSpot Lead" not "Workflow 4"
- Add emoji prefixes to group related workflows: 📧 for email, 📊 for reports, 🤖 for AI
- Rename individual nodes too — "Fetch Weather API" is clearer than "HTTP Request1"
Keep nodes small and focused
Each node should do one thing. Instead of one giant JavaScript Code node doing everything, use multiple Edit Fields, IF, and Set nodes. This makes debugging much easier — you can pinpoint exactly which step failed.
Use sticky notes for documentation
Right-click the canvas → "Add Sticky Note". Write a brief explanation of what the workflow does, any gotchas, and the last time it was updated. Your future self will thank you.
Test with edge cases
After your happy path works, test:
- What happens when the API returns an empty array?
- What if a required field is null or undefined?
- What if the API is down?
Add IF nodes and error paths to handle these gracefully.
Use Scriflow to describe your automation in plain English and get a complete n8n workflow JSON — ready to import into your n8n instance with one click. Perfect for complex workflows you don't want to build node by node.