Severe weather safety alerts in Slack for field sites
Every two hours, check the weather at each of your sites and only ping Slack when wind, temperature, or storm conditions cross a safety threshold.
Build me a severe weather safety alerter as a code workflow. This is a deterministic pipeline with no AI reasoning: a cron-triggered threshold scan that posts to one team Slack channel only when conditions are actually unsafe at one of our field sites.
Trigger: cron, every 2 hours.
Configuration (please expose these as clearly-named settings at the top of the workflow so I can edit them once at setup):
1. sites: a list of objects, each with { name, latitude, longitude }. Each entry represents a job site, office, or field location.
2. slack_channel_id: the Slack channel ID to post alerts to (one shared safety channel).
3. Thresholds, with sensible defaults: max_wind_speed_mph (default 30), min_temperature_f (default 20), max_temperature_f (default 100), and alert_condition_codes (a list of OpenWeather condition group ids to treat as severe; default to the Thunderstorm group 200-232, the Snow group 600-622, and the Atmosphere severe codes Tornado 781 and Squall 771).
Pipeline, per run:
Step 1. Iterate over the configured sites.
Step 2. For each site, call the Weather integration's Get Current Weather action with that site's latitude and longitude, using imperial units so temperatures come back in Fahrenheit and wind speed in mph.
Step 3. Evaluate the response against the thresholds. A site is breaching if any of these are true: wind speed > max_wind_speed_mph; OR temperature < min_temperature_f; OR temperature > max_temperature_f; OR the returned weather condition id is in alert_condition_codes. Collect the list of breached conditions and the current readings for the message.
Step 4. For each breaching site, call the Slack Bot integration's Send a Message action targeting slack_channel_id. The message should name the site, list every threshold that was breached, and include the current readings (temperature in °F, wind speed in mph, and the weather description like "Thunderstorm" or "Heavy snow"). Use Slack mrkdwn formatting so the site name is bold and the breached metrics stand out. Keep it scannable, one message per affected site.
Step 5. If no sites breach during a run, exit silently. Do not post an "all clear" or heartbeat message.
Important constraints: use the Slack Bot integration (slackbot), not the user-token Slack integration, because the alerts should come from a workspace bot, not from a person. Use the Weather integration's Get Current Weather action only. Do not call any AI model nodes, do not look at calendars, do not reason about the data. This is a pure scheduled threshold scan and channel post.
Additional information
What does this prompt do?
- Watches the weather at every job site, office, or field location you list, around the clock.
- Posts to your safety channel in Slack only when wind, temperature, or storm conditions cross thresholds you set.
- Stays silent on calm days. No heartbeat messages, no noise, no false alarms.
- Names the site and the exact reading that tripped the alert so the crew knows what action to take.
What do I need to use this?
- A Slack workspace and the channel where safety alerts should land.
- The latitude and longitude of each site you want monitored.
- The thresholds you treat as unsafe, like maximum wind speed, a safe temperature range, and which severe conditions count (thunderstorms, snow, extreme heat).
How can I customize it?
- Add, remove, or rename sites by editing the list of coordinates at the top of the workflow.
- Tighten or loosen the wind, temperature, and severe-condition thresholds to match your safety policy.
- Point alerts at a different Slack channel, or split crews across multiple channels.
- Change how often it runs if every two hours is too frequent or not frequent enough.
Frequently asked questions
What happens on a calm day?
Can I monitor more than one location?
How do I change which conditions count as severe?
Will it spam the channel every two hours?
Does the alert say which site is affected?
Keep your field crews ahead of severe weather.
Connect Slack once, drop in your site coordinates, and Geni quietly watches the weather and only pings the team when conditions turn unsafe.