What This Workflow Does
This workflow listens for a web request with a city name, gets weather details for that city from OpenWeatherMap, and sends back an easy-to-read weather message instantly.
It solves the problem of manually writing code to ask for weather and format answers.
The result is a fast response telling users the current temperature and how it feels, based on their city input.
Tools and Services Used
- n8n: For creating workflows and webhooks.
- OpenWeatherMap API: To fetch live weather data.
- Webhook URL: Endpoint to get user requests with city names.
Inputs, Processing, and Outputs
Inputs
- A GET web request with a query parameter named ‘parameter’ holding the city name (like ‘london,uk’).
- If no city is provided, the workflow uses ‘berlin,de’ as default.
Processing Steps
- Webhook node catches the web request.
- Set node extracts the ‘parameter’ query and saves it as ‘city’, or sets default.
- OpenWeatherMap node uses city name to fetch current weather data.
- Set node formats temperature and feels-like data into a readable data field.
Output
- The webhook response sends back a message like “It has 12°C and feels like 10°C in Berlin” in real time.
Beginner Step-by-Step: How To Use This Workflow in n8n
Step 1: Import the Workflow
- Download the workflow file using the Download button on this page.
- Inside your n8n editor, click “Import from File” and upload the downloaded workflow.
Step 2: Configure Credentials
- Open the OpenWeatherMap node and add your valid OpenWeatherMap API Key in the credentials section.
- Make any needed updates in IDs, emails, channels, or fields if present.
Step 3: Test and Activate
- Run the workflow once using the Execute button to check it works.
- Visit the webhook URL in browser or API client with a city parameter to verify response.
- Activate the workflow for production by toggling the activation switch.
After activation, the workflow will run automatically on each web request.
If running a self-hosted instance, make sure your server is accessible on the internet. For help, see self-host n8n.
Customization Ideas
- Change default city in the first Set node by changing ‘berlin,de’ to any other city.
- Change language in OpenWeatherMap node by editing the language code (e.g., ‘de’ for German).
- Add more details like humidity or weather conditions in final Set node.
Common Problems and Fixes
- Webhook does not trigger: Check webhook path and make sure HTTP method is GET.
- OpenWeatherMap API errors: Confirm API Key is correct and city names are well formed.
- Empty or wrong response text: Make sure JSON fields in final Set node match OpenWeatherMap’s data output.
Pre-Production Checklist
- Check API key is active and quota is available.
- Test webhook URL with different city parameters.
- Ensure workflow is activated before testing live calls.
- Verify field extraction in all Set nodes.
- Check final text for correct format and meaning.
Deployment Guide
Activate the workflow in n8n and share the webhook URL to users or embed in applications.
Monitor executions using n8n’s built-in logs for troubleshooting.
If running a private server, verify internet access. Use resources like self-host n8n if needed.
Summary
→ Automation listens to city requests and fetches weather data fast.
✓ Saves time by removing manual coding and API handling.
✓ Provides clear temperature and feels-like info to users.
✓ Easy to import and set up inside n8n.
✓ Ready for production with simple activation and testing.
