Current Weather
openweathermap.current_weather
ActionBusiness appsconnection required
Calls the OpenWeather API with the connection's credentials.
Read the conditions right now at one place — temperature, wind, cloud cover, humidity, pressure and visibility.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- OpenWeather
- Secret shape
- the API key, or {"api_key": "…"}
- Config it needs
- units, lang, base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
place A place name to resolve through the Geocoding API, as 'city', 'city,country code' or 'city,state code,country code' for the US — for example 'London,GB'. | string | No | — | — | London,GB |
lat Latitude of the place to look up, from -90 to 90. Give it together with 'lon', or name a 'place' or a 'postcode' instead. | number | No | — | -90–90 | 51.5074 |
lon Longitude of the place to look up, from -180 to 180. Give it together with 'lat', or name a 'place' or a 'postcode' instead. | number | Conditional | — | -180–180; only with lat | -0.1278 |
postcode A post code and its two-letter country code, divided by a comma, resolved through the Geocoding API — for example '94040,US'. | string | No | — | — | 94040,US |
units The unit system for this call: 'standard' is Kelvin and metres per second, 'metric' is Celsius, 'imperial' is Fahrenheit. Defaults to the connection's setting. | string | No | — | one of "standard", "metric", "imperial" | — |
lang Two-letter language code for the human-readable weather descriptions, such as 'es' or 'de'. Defaults to the connection's setting, and to English. | string | No | — | — | en |
- At least one of place, lat, postcode must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"lang": "en",
"lat": 51.5074,
"lon": -0.1278,
"place": "London,GB",
"postcode": "94040,US"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
coord The coordinates OpenWeather answered for. | object | — |
weather The condition codes, each with 'id', 'main', 'description' and 'icon'. | array | — |
base OpenWeather's internal name for the data source. | string | — |
main Temperature and pressure: 'temp', 'feels_like', 'temp_min', 'temp_max', 'pressure' and 'humidity'. | object | — |
visibility Visibility in metres, capped at 10000. | number | — |
wind Wind 'speed', 'deg' and, when reported, 'gust'. | object | — |
clouds Cloudiness as a percentage under 'all'. | object | — |
dt When these conditions were measured, as a Unix timestamp. | number | — |
sys Country code and the day's 'sunrise' and 'sunset' Unix timestamps. | object | — |
timezone The place's offset from UTC, in seconds. | number | — |
id OpenWeather's numeric city id. | number | — |
name OpenWeather's name for the matched city. | string | — |
cod OpenWeather's internal response code. | number | — |
location.lat The latitude this call actually used. | number | — |
location.lon The longitude this call actually used. | number | — |
location.name The place name the Geocoding API matched; empty when coordinates were given. | string | — |
location.country The two-letter country code of the matched place, when one was geocoded. | string | — |
location.source How the coordinates were reached: 'coordinates', 'geocode' or 'postcode'. | string | — |
{
"base": "",
"clouds": {},
"cod": 0,
"coord": {},
"dt": 0,
"id": 0,
"location": {
"country": "",
"lat": 0,
"lon": 0,
"name": "",
"source": ""
},
"main": {},
"name": "",
"sys": {},
"timezone": 0,
"visibility": 0,
"weather": [],
"wind": {}
}Notes
- A 'place' or 'postcode' costs one extra Geocoding API call before the weather call; passing 'lat' and 'lon' skips it.
- 'rain' and 'snow' appear only when there is precipitation, so a workflow must treat them as optional.
See Current Weather run in a workflow.
In a technical demo we add the OpenWeather connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.