← All N8N workflows
AI & researchAgentChat TriggerOpenAI Chat ModelMemory Buffer WindowTool Http Request

Integrating AI with Open-Meteo API for Enhanced Weather Forecasting

Configured with Agent, Chat Trigger, OpenAI Chat Model, Memory Buffer Window, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen chat messagereceivedChat TriggerAI & modelsOpenAI Chat ModelOpenAI Chat ModelAI & modelsGeneric AI Tool AgentAgentData storeChat Memory BufferMemory Buffer WindowWeb / APIA tool to get theweather forecast based…Tool Http RequestWeb / APIA tool for inputtingthe city and obtaining…Tool Http Request

Node categories in this workflow

  • Trigger
  • AI & models
  • Data store
  • Web / API

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When chat message receivedTriggerChat TriggerSee node parameters
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Generic AI Tool AgentAI & modelsAgentSee node parameters
Chat Memory BufferData storeMemory Buffer WindowSee node parameters
A tool to get the weather forecast based on geolocationWeb / APITool Http RequestSee node parameters
A tool for inputting the city and obtaining geolocationWeb / APITool Http RequestSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • openAiApi

Workflow notes

Integrating AI with Open-Meteo API for Enhanced Weather Forecasting

Integrating AI with Open-Meteo API for Enhanced Weather Forecasting

Use case

Workshop

We are using this workflow in our workshops to teach how to use Tools a.k.a functions with artificial intelligence. In this specific case, we will use a generic "AI Agent" node to illustrate that it could use other models from different data providers.

Enhanced Weather Forecasting

In this small example, it's easy to demonstrate how to obtain weather forecast results from the Open-Meteo site to accurately display the upcoming days.

This can be used to plan travel decisions, for example.

What this workflow does

  1. We will make an HTTP request to find out the geographic coordinates of a city.
  2. Then, we will make other HTTP requests to discover the weather for the upcoming days.

In this workshop, we demonstrate that the AI will be able to determine which tool to call first—it will first call the geolocation tool and then the weather forecast tool. All of this within a single client conversation call.

Setup

Insert an OpenAI Key and activate the workflow.

by Davi Saranszky Mesquita https://www.linkedin.com/in/mesquitadavi/

Create an Hosted Web Chat

Create an Hosted Web Chat

And setup the trigger!

Example: https://website/webhook/4a4..../chat

Setup OpenAI Key

Setup OpenAI Key

Open Meteo SPEC - City Geolocation

Open Meteo SPEC - City Geolocation

This tool will go to the URL https://geocoding-api.open-meteo.com/v1/search to fetch the geolocation data of the city, and I only need to get the name of the city.

So, I will ask the user to input the name of the city and pass some pre-existing information, such as returning only the first city and returning in JSON format.

  • name (By Model) - And placeholder - The parameter that the AI will need to fill in as required.

  • count - 1 by default because I want only the first city.

  • format - Putting JSON for no specific reason, but OpenAI could figure out how to process that information.

Open Meteo SPEC - Weather Forecast

Open Meteo SPEC - Weather Forecast

This tool will go to the Open Meteo site with the geolocation information at https://api.open-meteo.com/v1/forecast

It will pass the information on latitude, longitude, and the number of days for which it will bring data.

There are many default pieces of information within, but the focus is not to explain the Open Meteo API.

Variables like latitude, longitude, and forecast_days are self-explanatory for OpenAI, making it the easiest tool to configure.

  • latitude (By Model) and Placeholder
  • longitude (By Model) and Placeholder
  • forecast_days (By Model) and Placeholder
Integrating AI with Open-Meteo API for Enhanced Weather Forecasting

Integrating AI with Open-Meteo API for Enhanced Weather Forecasting

Purpose and structure

This folder contains the Integrating AI with Open-Meteo API for Enhanced Weather Forecasting workflow. Its executable nodes use agent, chatTrigger, lmChatOpenAi, memoryBufferWindow, toolHttpRequest. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When chat message received

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Stickynote/1509_Stickynote_Automation_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Within N8N, there will be a chat button to test, or you can use the external chat link from the trigger.

More in AI & research