Weather

Gets current and future weather information

Overview

This node fetches current weather information from the OpenWeatherMap API based on user-defined location parameters. It supports multiple location input methods such as city name, city ID, geographic coordinates, or zip code, and allows users to specify the unit format (Imperial, Metric, or Scientific) and language for the weather data. This node is useful for workflows that require real-time weather data for specific locations, such as weather monitoring, alerting systems, or integrating weather conditions into other automation processes.

Use Case Examples

  1. Get current weather by city name (e.g., Berlin, DE) in metric units.
  2. Retrieve current weather using geographic coordinates (latitude and longitude) in imperial units.
  3. Fetch weather data by zip code with language preference set to German.

Properties

Name Meaning
Format The unit system in which the weather data should be returned (Imperial, Metric, or Scientific).
Location Selection Method to specify the location for which to retrieve weather data (City Name, City ID, Coordinates, or Zip Code).
City The name of the city to return the weather of (required if Location Selection is City Name).
City ID The ID of the city to return the weather of (required if Location Selection is City ID).
Latitude The latitude coordinate of the location (required if Location Selection is Coordinates).
Longitude The longitude coordinate of the location (required if Location Selection is Coordinates).
Zip Code The zip code of the location (required if Location Selection is Zip Code).
Language Optional two-letter language code to get the output in a specific language (e.g., en, de).

Output

JSON

  • weather - The current weather data object returned from the OpenWeatherMap API, containing detailed weather information for the specified location.

Dependencies

  • OpenWeatherMap API key credential

Troubleshooting

  • If no credentials are provided or invalid, the node throws an error 'No credentials got returned!'. Ensure the OpenWeatherMap API key is correctly configured.
  • If an unsupported location selection method is used, the node throws an error indicating the unknown location selection.
  • If an unsupported operation is selected, the node throws an error indicating the unknown operation.
  • Network or API request failures result in API errors; check network connectivity and API key validity.

Links

Discussion