Provide normalized weather forecasts with WeatherAPI and Open-Meteo
Quick overview
Description
Quick overview This workflow exposes a webhook-based weather proxy API that builds a request from query parameters, fetches forecast data from WeatherAPI or historical averages from Open-Meteo Archive, and returns a simplified JSON response with key temperature and condition fields. How it works Receives a webhook request on the /weather-proxy endpoint with query parameters like lat, lon, and start_date. Builds an external API URL by comparing start_date to today, using WeatherAPI for dates within 14 days and Open-Meteo Archive for older dates. Calls the selected weather provider over HTTP to retrieve forecast or historical daily weather data. Normalizes the provider response into a compact JSON payload (max/min temperature and a derived condition such as hot/cold/rain/snow, plus rain chance or rain percentage). Returns the formatted JSON response to the webhook caller with CORS and JSON content-type headers. Setup Replace the hardcoded WeatherAPI key in the parameter-building code with your own WeatherAPI API key. Ensure the calling app sends lat, lon, and start_date as webhook query parameters (or rely on the default Tokyo coordinates). Copy the production webhook URL for /weather-proxy and configure it in your client application as the weather endpoint. An n8n automation workflow template by Hide.
Community Metrics
Author
Hide
Platform
web
Pricing model
free
Categories
- Automation
Tags
- n8n
- workflow
- http-request
- code
Capabilities
- 2 nodes