n8n workflow template · 6 nodes · OpenAI
Integrating AI with Open-Meteo API for Enhanced Weather Forecasting is a free n8n workflow template that starts when a chat message is received and works with OpenAI. It has 6 nodes, 6 of them AI nodes (Chat Trigger, OpenAI Chat Model, AI Agent and Window Buffer Memory). To run it, you add your own credentials for OpenAI API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
This tool will go to the URL 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.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
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.
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.
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.
Insert an OpenAI Key and activate the workflow.
by Davi Saranszky Mesquita
This tool will go to the Open Meteo site with the geolocation information at
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.
The 6 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us