What This Automation Does
This workflow gets live weather info for any city you ask, fast and simple. It stops you from looking up weather by hand, which takes time and can cause mistakes. The result is a clear JSON report with temperature and weather type, sent right back when you call a special web link.
The workflow starts when you use a webhook URL with a city name. Then it asks OpenWeatherMap for current temperature and weather details of that city. Next, it picks out just the temperature and a short description like “clear sky” or “light rain.” Finally, it sends this clean data back to you.
Prerequisites ⚙️
- n8n account: Access to n8n automation platform to create and run workflows.
- OpenWeatherMap API key 🔑: You need to sign up at OpenWeatherMap and get a free API key to use their weather data.
- Internet access 🌐: Workflow calls external API, so reliable internet connection is necessary.
Step-by-Step Guide
Using This Workflow in Production
Step 1: Import the Workflow
- Download the workflow file using the Download button on this page.
- Open your n8n editor where you manage workflows.
- Click on the menu and select Import from File. Upload the downloaded workflow file.
Step 2: Configure After Import
- Add your OpenWeatherMap API key in the credentials section of the OpenWeatherMap node.
- Check if any node IDs, emails, channels, or folder names need updating and change them if needed.
Step 3: Test the Workflow
- Trigger the webhook URL by entering it in the browser or using an API tool with
?city=CityNamequery parameter. - Look for a JSON response showing temperature and weather description.
- Ensure the data matches your requested city.
Step 4: Activate the Workflow
- Turn on the Webhook node to ACTIVE in n8n to start listening for requests.
- Now, the workflow is live and ready to serve weather info on demand.
For links to self-host n8n, check resources if you want to host your own server.
Inputs, Processing, and Output
Input: The workflow waits for an HTTP request at the webhook URL. It expects the city name as a query parameter named city.
Processing Steps:
- The Webhook node captures the incoming city query.
- The OpenWeatherMap node uses the city name to fetch live weather data from the external API.
- The Set node extracts only the temperature and weather description from the full API response.
Output: The final output is a simple JSON object with two fields: temp for temperature and description for weather summary.
Customizations ✏️
- Add more weather details like humidity or wind speed by editing the Set node and referencing the right JSON paths.
- Change the webhook path to a name you easily remember, such as
get-city-weather. - Switch the Webhook node HTTP method to POST for sending city data in the request body.
- Adjust temperature units in the OpenWeatherMap node settings to Celsius or Fahrenheit instead of Kelvin.
- Add a Slack node after the Set node to notify a team channel automatically for each weather request.
Troubleshooting 🔧
Error: Invalid API key or Unauthorized
Cause: The OpenWeatherMap API key may be missing, wrong, or expired.
Fix: Re-enter a valid API key in the OpenWeatherMap node credentials. Test with a known city name.
Error: Webhook returns empty data or errors
Cause: The webhook URL was called without the city query parameter or it was misspelled.
Fix: Always include ?city=CityName exactly in the webhook URL. For example: https://your-n8n-instance.com/webhook/weather-info?city=Paris.
Pre-Production Checklist ✅
- Make sure the OpenWeatherMap API key is valid and allowed for data access.
- Try the webhook URL multiple times with different city names to check correct responses.
- Confirm the JSON output from the Set node contains only temperature and description fields.
- Backup all workflows in n8n before turning on in the live environment.
Deployment Guide
After testing, switch your workflow to ACTIVE mode to start running it for real users.
Push this to production on your live n8n server where it can handle weather requests anytime.
Watch the run logs to catch any errors or issues.
If you get many requests, think about scaling your servers or storing common city data temporarily to save API calls.
Conclusion
This workflow gives you a fast way to get live weather info for any city by just making a simple web call.
This cuts out the need for manual searching and copying weather facts, saving time and avoiding mistakes.
You can use this in lots of apps or websites where weather data is needed on demand.
Take it further by adding more info fields, making daily weather summaries, or linking to travel booking services.
Try it yourself and change it to fit what you need best.
Summary and Results
✓ Saves time by automatically getting current weather without manual lookups.
✓ Cuts errors by fetching data directly using a city parameter.
✓ Outputs clear JSON with just temperature and description.
✓ Easy to activate and test inside n8n.
✓ Flexible for adding more weather details or changing how input is received.
→ Provides fast, reliable weather info for travel blogs, apps, or daily use.
→ Supported by simple webhook calls anyone can make.
