Integrate HG Weather API with Your Virtual Assistant

Learn how to integrate HG Weather API with your AI agent for real-time weather information.


HG Weather Integration Guide

This guide will walk you through integrating the HG Weather API with your OpenAssistantGPT chatbot.

Overview

HG Weather is a specialized weather service focused on providing accurate weather forecasts for cities across Brazil. The service offers detailed local weather information including temperature, humidity, wind conditions, and precipitation forecasts. It features both current conditions and extended forecasts, with particular attention to tropical weather patterns and regional climate characteristics. The API provides comprehensive coverage of Brazilian cities and municipalities, making it especially valuable for applications serving the Brazilian market.

Integration Steps

1. Review API Documentation

First, visit the HG Weather API documentation to understand the available endpoints and how they work.

2. Create Custom Action

In your OpenAssistantGPT dashboard:

  1. Go to the Actions Dashboard
  2. Click "Create New Action"
  3. Chose Get or Post
  4. Fill the action form with the following details:

Name: get_hg_weather_data

Description: Get data using HG Weather

URL: https://hgbrasil.com/status/weather

Parameters: This will depend on the API you are integrating. Parameters are query parameters passed in the URL.

3. Assign Action to Your Chatbot

  1. Go to your Chatbot Dashboard
  2. Select your chatbot
  3. Go to "Settings" > "Actions"
  4. Add the get_hg_weather_data action to your chatbot

Using the Integration

Your chatbot can now handle weather-related queries. Here are some example questions you can ask:

  • What's the weather like in São Paulo?
  • Is it going to rain in Rio de Janeiro today?
  • Check the humidity levels in Salvador

The chatbot will automatically use the HG Weather API to fetch and return the requested information.

Additional Resources