Integrating AI with Open-Meteo API for enhanced weather forecasting
Needs changesWhat this workflow does
This AI workflow has 6 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model and HTTP Request. It also calls api.open-meteo.com over HTTP.
How it runs
Trigger: When a chat message arrives.
- Generic AI Tool Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (A tool for inputting the city and obtaining geolocation, A tool to get the weather forecast based on geolocation); memory: Chat Memory Buffer
Services it uses
HTTP calls to: api.open-meteo.com
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in Generic AI Tool Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- HTTP Request Tool (legacy) in A tool to get the weather forecast based on geolocation, A tool for inputting the city and obtaining geolocation: replace with HTTP Request node connected to the AI Agent's Tool input.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Generic AI Tool Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| HTTP Request Tool (legacy) A tool to get the weather forecast based on geolocation, A tool for inputting the city and obtaining geolocation | HTTP Request node connected to the AI Agent's Tool input |
Nodes used (5)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest
From the author
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…