Automate weather reports with GPT-4 Mini and Open-Meteo API to Gmail and Slack
Workflow preview
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER
Early Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
Important notice
This workflow is provided as-is. Please review and test before using in production.
Overview
This workflow provides a comprehensive weather reporting system with two main functionalities: a scheduled daily summary and an interactive AI agent for dynamic queries.
Who's it for?
This template is ideal for anyone who wants to stay updated on the weather, from individuals planning their day to teams needing automated daily briefings. It's also a great example for developers and n8n users who want to explore the capabilities of AI Agents and integrating external APIs in their workflows.
What it does / How it works
This workflow operates in two distinct modes:
Scheduled Daily Summary:
- The workflow triggers automatically every day at 9:00 AM (customizable) or can be run manually.
- It fetches the latest weather data for a specified location (default is near Chiba, Japan) from the Open-Meteo API.
- It then formats a message with the day's maximum and minimum temperatures.
- Finally, it sends this summary to a designated Gmail address and a Slack channel.
AI-Powered Forecasts via Chat:
- When you send a message to the Chat Trigger webhook, it activates the AI Agent.
- The AI Agent, powered by an OpenAI model, understands natural language questions like "What's the humidity right now?" or "Will it be warmer tomorrow?".
- The agent uses an HTTP Request tool to fetch real-time, specific data from the weather API to answer your question.
- The generated answer is then sent back to you via both Gmail and Slack.
How to set up
- Configure Credentials: Add your credentials for OpenAI, Gmail, and Slack in the credentials menu.
- Set Your Location: In the
Fetch Weather DataandHTTP Request Tool for AInodes, update thelatitudeandlongitudein the URL to your desired location. - Update Email and Slack:
- In the
Send Email SummaryandSend AI Response via Emailnodes, change the recipient email address to your own. - In the
Send Slack SummaryandSend AI Response via Slacknodes, select your desired Slack channel.
- In the
- Adjust the Schedule: Modify the
Schedule Triggernode to change the time or frequency of the daily summary. - Activate the Workflow: Click the "Active" toggle in the top-right corner to enable the workflow.
How to customize the workflow
- Change the Message: You can easily customize the notification message in the
Format Daily Summarynode (for the summary) and in theSend...nodes for both flows. - Add More Data: The Open-Meteo API provides a wealth of data. You can fetch additional information like precipitation, wind speed, or UV index by modifying the URL in the HTTP Request nodes.
- Integrate Other Services: Add other notification nodes like Discord, Telegram, or Microsoft Teams to send the weather reports to more platforms.