Overview
Welcome to the OpenWeatherMap integration guide for Julep! This integration allows you to seamlessly access weather data for various locations, enabling you to build workflows that require real-time weather information.Prerequisites
To use the OpenWeatherMap integration, you need an API key. You can obtain this key by signing up at OpenWeatherMap.
How to Use the Integration
To get started with the OpenWeatherMap integration, follow these steps to configure and create a task:1
Configure Your API key
Add your API key to the tools section of your task. This will allow Julep to authenticate requests to OpenWeatherMap on your behalf.
2
Create Task Definition
Use the following YAML configuration to request weather data service in your task definition:
Weather Request Example
3
Run Task
Deploy your task by creating a new execution.
YAML Explanation
Basic Configuration
Basic Configuration
- name: A descriptive name for the task, in this case, “Weather Request”.
- tools: This section lists the tools or integrations being used. Here,
weather_call
is defined as an integration tool.
Tool Configuration
Tool Configuration
- type: Specifies the type of tool, which is
integration
in this context. - integration: Details the provider and setup for the integration.
- provider: Indicates the service provider, which is
weather
for OpenWeatherMap. - method: Specifies the method to be used. Default is
get
if not specified. If not specified, the method will beget
by default. - setup: Contains configuration details, such as the API key (
openweathermap_api_key
) required for authentication.
- provider: Indicates the service provider, which is
Workflow Configuration
Workflow Configuration
- main: Defines the main execution steps.
- tool: Refers to the tool defined earlier (
weather_call
). - arguments: Specifies the input parameters for the tool:
- location: The location for which weather data is needed.
- tool: Refers to the tool defined earlier (
Remember to replace
OPENWEATHERMAP_API_KEY
with your actual API key.Conclusion
With the OpenWeatherMap integration, you can easily incorporate weather data into your workflows. This integration provides a robust solution for accessing real-time weather information, enhancing your workflow’s functionality and user experience.For more information, please refer to the OpenWeatherMap documentation.