Skip to main content

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
name: Weather Request

tools:
  - name: weather_call
    type: integration
    integration:
      provider: weather
      method: get
      setup:
        openweathermap_api_key: "OPENWEATHERMAP_API_KEY"

main:
- tool: weather_call
  arguments:
    location: London
3

Run Task

Deploy your task by creating a new execution.

YAML Explanation

  • 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.
  • 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 be get by default.
    • setup: Contains configuration details, such as the API key (openweathermap_api_key) required for authentication.
  • 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.
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.
I