Actions2
Overview
This node fetches weather information from the OpenWeatherMap API, supporting two main operations: retrieving the current weather and a 5-day weather forecast. It allows users to specify the location using city name, city ID, geographic coordinates, or zip code, and supports different units of measurement (Imperial, Metric, Scientific) and language options. This node is useful for automating weather data retrieval for applications like weather dashboards, alerts, or integration with other workflows.
Use Case Examples
- Get the current weather for Berlin, Germany using city name in metric units.
- Retrieve a 5-day weather forecast for a location specified by geographic coordinates in imperial units.
- Fetch weather data in a specific language, e.g., German, for a zip code location.
Properties
| Name | Meaning |
|---|---|
| Format | The unit system to format the weather data (Imperial, Metric, Scientific). |
| Location Selection | Method to specify the location for which to return weather data (City Name, City ID, Coordinates, Zip Code). |
| City | The city name to return the weather for (required if Location Selection is City Name). |
| City ID | The city ID to return the weather for (required if Location Selection is City ID). |
| Latitude | Latitude coordinate for the location (required if Location Selection is Coordinates). |
| Longitude | Longitude coordinate for the location (required if Location Selection is Coordinates). |
| Zip Code | Zip code for the location (required if Location Selection is Zip Code). |
| Language | Two-letter language code to get the output in a specific language (optional). |
Output
JSON
weatherData- The JSON response from the OpenWeatherMap API containing weather information for the specified location and operation.
Dependencies
- OpenWeatherMap API key credential required for authentication.
Troubleshooting
- If no credentials are provided, the node throws an error indicating missing credentials.
- If an unknown location selection method is used, the node throws an error specifying the unknown method.
- If an unsupported operation is selected, the node throws an error indicating the unknown operation.
- Network or API errors during the request will throw an API error with details from the OpenWeatherMap API.
Links
- OpenWeatherMap API Documentation - Official documentation for the OpenWeatherMap API used by this node.