12 Jan Practical Exercise: Daily Weather Forecast Fetcher with n8n
Let’s apply the n8n concepts by building a workflow that gets a daily weather forecast. Build a complete, functional workflow from trigger to output:
- Objective: Create a workflow triggered by a Schedule node that fetches weather data from the free Pirate Weather API, formats it, and outputs a readable summary.
- Step-by-Step Guide:
- Add a Schedule Trigger: Drag it onto the canvas and set it to run daily.
- Add an HTTP Request Node: Connect it to the Schedule node. This node will call the weather API.
- Set Method to GET.
- For the URL, use the Pirate Weather format: https://api.pirateweather.net/forecast/[YourAPIKey]/[Latitude],[Longitude]. You can get a free API key from their website.
- Add query parameters like ?units=si for metric units.
- Add a Set Node (for Transformation): Connect it to the HTTP node to format the raw API data.
- In the Add Value field, create a new field like weather_summary.
- In its expression editor, craft a readable string by referencing data from the previous node: Today’s forecast for {{ $json.latitude }}, {{ $json.longitude }}: {{ $json.daily.summary }} High: {{ $json.daily.data[0].temperatureHigh }}°C.
- Add a Result Node: Connect the Set node to a Code or Email Send node. Configure it to log or send the weather_summary field you created.
Let us summarize the components we used in our example above:

If you liked the tutorial, spread the word and share the link and our website, Studyopedia, with others.
For Videos, Join Our YouTube Channel: Join Now
Read More:
- What is Deep Learning
- Feedforward Neural Networks (FNN)
- Convolutional Neural Network (CNN)
- Recurrent Neural Networks (RNN)
- Long short-term memory (LSTM)
- Generative Adversarial Networks (GANs)
No Comments