Quick Overview
This workflow runs daily at 7 PM IST, pulls an overnight forecast from OpenWeatherMap and plant inventory data from Google Sheets, uses Google Gemini to identify plants whose temperature tolerances are at risk, and posts critical alerts to a Slack channel.
How it works
- Runs every day at 7 PM IST on a schedule.
- Requests the weather forecast from the OpenWeatherMap API for the configured latitude/longitude and units, then calculates the overnight low/high and summary conditions.
- Reads the plant inventory from Google Sheets and aggregates it into a single list.
- Sends the forecast and plant list to a Google Gemini agent to return a structured list of plant risk alerts.
- Checks whether any alerts are returned and, if so, formats them into a single notification message.
- Posts the alert message to the selected Slack channel.
Setup
- Add an OpenWeatherMap API key as an HTTP Query Auth credential and set your latitude, longitude, and units values.
- Connect Google Sheets using a Service Account (or update authentication) and set the target spreadsheet and sheet that contain your plant inventory.
- Add Google Gemini (Google PaLM) API credentials for the AI agent.
- Add Slack credentials and choose the channel where alerts should be posted.
- Adjust the schedule trigger time/cron expression if you want the check to run at a different local time.