← Back to challenges

Weather Alert Bot

1 newbie
HTTP Request Conditional Logic Notifications

Build a workflow that checks weather conditions and sends alerts when specific criteria are met. Learn API consumption, conditional logic, and notification delivery.

Your Challenge

Core Functionality

Your workflow must:

  • Use Schedule Trigger node to check weather every hour (or custom interval)
  • Fetch current weather data from a weather API (OpenWeatherMap, WeatherAPI, etc.)
  • Extract key weather metrics: temperature, conditions, precipitation chance
  • Implement conditional logic to check if alert conditions are met (e.g., temp < 32°F, rain > 70%)
  • Send notification when alert conditions trigger (email, Slack, Discord, or SMS)
  • Include relevant weather details in the alert message (current temp, conditions, forecast)

Edge Cases

Your workflow should handle:

  • Handle missing weather data fields from API response
  • Deal with API responses in different temperature units (Celsius/Fahrenheit)
  • Handle extreme weather values correctly (negative temps, 100% humidity)

Bonus Challenges (Optional)

Take it further by:

  • Add multiple alert conditions (temperature, rain, wind, snow, air quality)
  • Support different notification channels based on alert severity
  • Include weather forecast for next 6-12 hours in alert
  • Add location-based alerts for multiple cities
  • Create "all clear" notifications when conditions improve
  • Track alert history and prevent duplicate notifications within timeframe

Tips & Hints

  • OpenWeatherMap offers a free tier with hourly updates
  • Use the HTTP Request node to call weather APIs
  • The IF node is perfect for checking temperature thresholds
  • The Switch node can route to different alert channels based on severity
  • Test with manual trigger first before enabling schedule
  • Consider using environment variables for API keys and alert thresholds