Automate City Weather Info Retrieval with n8n Webhook & OpenWeatherMap

Discover how to automate retrieving precise weather details for any city using n8n’s Webhook and OpenWeatherMap integration. Save time and eliminate manual lookups with this hands-on workflow that delivers temperature and descriptions instantly.
webhook
openWeatherMap
set
Workflow Identifier: 2396
NODES in Use: Webhook, OpenWeatherMap, Set

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor where you manage workflows.
  3. Click on the menu and select Import from File. Upload the downloaded workflow file.

Step 2: Configure After Import

  1. Add your OpenWeatherMap API key in the credentials section of the OpenWeatherMap node.
  2. Check if any node IDs, emails, channels, or folder names need updating and change them if needed.

Step 3: Test the Workflow

  1. Trigger the webhook URL by entering it in the browser or using an API tool with ?city=CityName query parameter.
  2. Look for a JSON response showing temperature and weather description.
  3. Ensure the data matches your requested city.

Step 4: Activate the Workflow

  1. Turn on the Webhook node to ACTIVE in n8n to start listening for requests.
  2. 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.


Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free