Automate Weather Reports with GPT-4 Mini and Open-Meteo API to Gmail and Slack
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 Data and HTTP Request Tool for AI nodes, update the latitude and longitude in the URL to your desired location. Update Email and Slack: In the Send Email Summary and Send AI Response via Email nodes, change the recipient email address to your own. In the Send Slack Summary and Send AI Response via Slack nodes, select your desired Slack channel. Adjust the Schedule: Modify the Schedule Trigger node 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 Summary node (for the summary) and in the Send... 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.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments