Reference · Tools
OpenWeatherMap
Get current weather data and 5-day forecasts from the OpenWeatherMap API by city name, city ID, coordinates, or zip code.
The OpenWeatherMap node fetches current conditions or a 5-day forecast, locating the place by city name, city ID, coordinates or zip code. A typical build is checking tomorrow's forecast each evening and alerting a field team when conditions would stop work.
- Node type
- Action
- Parameters
- 10
- Outputs
- Output, Error
- Credentials
- OpenWeatherMap API
OpenWeatherMap
Get current weather data and 5-day forecasts from OpenWeatherMap.
Overview
OpenWeatherMap provides weather data for any location worldwide. This tool retrieves current weather conditions or 5-day/3-hour forecasts via the OpenWeatherMap API v2.5 (https://api.openweathermap.org/data/2.5). It supports four location selection methods: city name (e.g., “berlin,de”), city ID (from the OpenWeatherMap bulk data), geographic coordinates (latitude/longitude), or zip/postal code (e.g., “10115,de”). Results can be returned in metric (Celsius, m/s), imperial (Fahrenheit, mph), or scientific (Kelvin, m/s) units. An optional language parameter controls the output language for weather descriptions. Authentication is via an API key.
Category: Utility
Tool Name: open_weather_map
Version: 1
Appearance: Icon: lucide-CloudSun | Color: #E96E4B
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires OpenWeatherMap API credentials. See the Credentials Guide for setup instructions.
Operations
| Operation | Value | Description |
|---|---|---|
| Current Weather | currentWeather | Returns the current weather data |
| 5 Day Forecast | 5DayForecast | Returns the weather data for the next 5 days (3-hour intervals) |
Parameters
Both operations take the same parameters — the operation only selects which OpenWeatherMap endpoint is queried. Which location field you fill in is decided by Location Selection, not by the operation.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Format | options | No | metric | The unit format for the returned data. |
Options: imperial (Fahrenheit | miles/hour), metric (Celsius | meter/sec), standard (Kelvin | meter/sec — shown as “Scientific”) | ||||
| Location Selection | options | No | cityName | How to define the location for which to return the weather. |
Options: cityName, cityId, coordinates, zipCode | ||||
| City | string | Yes | — | The name of the city to return the weather of. Optionally include country code (e.g., “london,uk”). Supports expressions. (shown when Location Selection is cityName) |
| City ID | number | Yes | 160001123 | The ID of the city to return the weather of. City ID list can be downloaded from http://bulk.openweathermap.org/sample/. (shown when Location Selection is cityId) |
| Latitude | string | Yes | — | The latitude of the location to return the weather of. Supports expressions. (shown when Location Selection is coordinates) |
| Longitude | string | Yes | — | The longitude of the location to return the weather of. Supports expressions. (shown when Location Selection is coordinates) |
| Zip Code | string | Yes | — | The zip/postal code to return the weather of. Optionally include country code (e.g., “10115,de”). Supports expressions. (shown when Location Selection is zipCode) |
| Language | string | No | — | The two-letter language code to get your output in (e.g., en, de, fr, es, it, pt, ru, ja, zh_cn). |
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
The OpenWeatherMap API response is merged onto the input item JSON — the incoming fields pass through unchanged, and binary data is forwarded. Weather values (temperature, humidity, wind, and so on) are reported in the units selected by Format.
How many output items you get depends on the operation:
| Operation | Output |
|---|---|
currentWeather | One output item per input item — the current-conditions response merged onto the item. |
5DayForecast | Fans out: one output item per forecast entry in the response’s list (3-hour steps over 5 days). Each entry carries a city property holding the response’s city block, so the location details are available on every item. |
Because a forecast turns one input item into many, index-based pairing with the upstream node no longer holds downstream — put any field you need to match on onto the input item and it will still be present on every forecast entry.
Usage Examples
- Get current weather for London
- Get 5-day forecast for New York by coordinates
- Get weather in Berlin using zip code in metric units
- Get current temperature in Tokyo in Fahrenheit
- Get 5-day weather forecast for a city ID
Example Configuration
Current weather by city name, in Celsius:
{
"type": "open_weather_map",
"parameters": {
"operation": "currentWeather",
"locationSelection": "cityName",
"cityName": "London,UK",
"format": "metric",
"language": "en"
}
}
5-day forecast by coordinates coming from the incoming item, in Fahrenheit:
{
"type": "open_weather_map",
"parameters": {
"operation": "5DayForecast",
"locationSelection": "coordinates",
"latitude": "{{ $json.lat }}",
"longitude": "{{ $json.lon }}",
"format": "imperial"
}
}
Current weather by city ID, with German descriptions and Kelvin units:
{
"type": "open_weather_map",
"parameters": {
"operation": "currentWeather",
"locationSelection": "cityId",
"cityId": 2643743,
"format": "standard",
"language": "de"
}
}
Weather by postal code, throttled for a large batch of items:
{
"type": "open_weather_map",
"parameters": {
"operation": "currentWeather",
"locationSelection": "zipCode",
"zipCode": "{{ $json.postcode }},de",
"format": "metric",
"language": "de",
"maxConcurrency": 5
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Get current weather or 5-day forecasts from OpenWeatherMap by city name, coordinates, city ID, or zip code.
Important Notes
- Always ensure the location parameter matches the
locationSelectionvalue - When using coordinates, both
latitudeandlongitudemust be provided as strings - City names can include country codes for better accuracy (e.g., “Paris,FR”)
- Language codes should be standard two-letter ISO codes
- City IDs are numeric values, not strings
Frequently asked questions
Why is my location not resolving?
The location parameter must match the Location Selection you chose. Supplying a city name while the selection is set to coordinates is the usual cause of a failed lookup.
How do I use coordinates?
Provide both latitude and longitude, as strings. One without the other cannot resolve a location.
How do I disambiguate a common city name?
Include the country code — for example `Paris,FR` — which is far more reliable than the bare name for cities that exist in several countries.
What format do city IDs and language codes take?
City IDs are numeric values rather than strings, and language codes are standard two-letter ISO codes.
Build with the OpenWeatherMap node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need OpenWeatherMap API credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.