AI-Powered Weather Forecasting with Open-Meteo and n8n

Discover how this unique n8n workflow integrates AI with the Open-Meteo API to deliver accurate weather forecasts. Automate city geolocation and multi-day weather data retrieval to make informed travel plans easily.
chatTrigger
lmChatOpenAi
agent
+3
Workflow Identifier: 1779
NODES in Use: chatTrigger, lmChatOpenAi, stickyNote, agent, memoryBufferWindow, toolHttpRequest

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow gets user chat requests for weather information in a city and timeframe.

It fetches the city location then gets a weather forecast.

The final result is a clear weather report for the user.

The goal is to save time and avoid errors in finding weather data manually.


How This Workflow Works (Input → Process → Output)

Input

  • User sends chat message asking for weather in a city and time period.

Processing Steps

  • Chat Trigger: Detects the chat input.
  • OpenAI Chat Model: Understands the query and plans next actions.
  • Chat Memory Buffer: Keeps track of chat history for follow-up messages.
  • Agent Node: Controls which API calls happen next.
  • Geolocation Tool: Requests city latitude and longitude from Open-Meteo geocoding API.
  • Weather Forecast Tool: Gets weather forecast data from Open-Meteo API using the geolocation.

Output

User receives detailed weather forecast report for selected days and city.


Who Should Use This Workflow

This workflow fits people who need quick, reliable weather info for different places.

It’s good for event planners, travelers, or anyone checking weather regularly.

Users with little time for manual search will save many hours.


Tools and Services Used

  • n8n Platform: Runs the automation workflow.
  • OpenAI API: Understands chat input and manages API calls.
  • Open-Meteo Geocoding API: Finds city coordinates.
  • Open-Meteo Weather Forecast API: Provides temperature and precipitation forecast data.

Beginner Step-By-Step: Using This Workflow in n8n Production

Step 1: Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to use this workflow.
  3. Choose Import from File and upload the downloaded workflow JSON.

Step 2: Configure Credentials

  1. Enter your OpenAI API Key in the OpenAI Chat Model node’s credential settings.
  2. Make sure the HTTP Request nodes for geolocation and weather have correct URLs (usually no change needed).
  3. If needed, update IDs, emails, channels, folders, or tables if the workflow connects to other services (not in this basic workflow).

Step 3: Test the Workflow

  1. Run the workflow once manually to check if it returns weather data correctly.
  2. You can test sending messages like: Weather Forecast for the Next 7 Days in São Paulo.

Step 4: Activate for Production

  1. Switch the workflow to active in n8n.
  2. Connect your chat user interface or API to the Webhook URL from the chat trigger node for live use.

If you want full control or better performance, consider self-host n8n on your own server.


Customization Ideas

  • Change forecast days count in the weather tool to get shorter or longer reports.
  • Add extra weather info like wind speed or humidity by updating API query parameters.
  • Switch the OpenAI model to GPT-3.5-turbo for lower cost or other models as needed.
  • Add more API tools to include other data sources, then update the AI agent workflow.

Inputs and Outputs Explained

  • Input: User chat message with city name and desired forecast length.
  • Output: Weather forecast summary showing temperature max and precipitation for requested days.

Common Failures and Fixes

  • OpenAI 401 Unauthorized — Check API key in OpenAI Chat Model node and update if expired.
  • No Weather Data Returned — Confirm latitude and longitude map correctly from geolocation response to weather API query.
  • Chat Lost Previous Messages — Make sure Chat Memory Buffer node is connected and active.
  • Webhook Not Responding — Verify workflow is active and network can reach webhook URL.

Summary of What You Get

✓ Quick and easy weather info by just chatting.

✓ Automatically finds location and fetches accurate forecasts.

✓ Saves time by avoiding manual web searches.

→ A weather assistant ready inside your n8n setup.


Deployment Guide

After importing and testing, turn your workflow on in n8n.

Connect frontend chat with the webhook URL from the When chat message received node.

Watch execution logs to ensure smooth runs.

Optionally, add notifications or logging nodes for better production monitoring.


Frequently Asked Questions

Update the API Key in the OpenAI Chat Model node credentials with a valid one.
Mapping of latitude and longitude from geolocation API to weather API may be incorrect.
Yes, switch the model in the OpenAI Chat Model node to models like GPT-3.5-turbo if desired.
No, chat history is kept only in memory during the chat session using Chat Memory Buffer.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free