See llms.txt for all machine-readable content.

Back to Templates

Send HAB early warnings and exposure reports with NOAA ERDDAP, Open-Meteo and Gmail

Quick overview

Youtube Video: https://youtu.be/_F_6ivgk4PU

This workflow runs every six hours to monitor NOAA ERDDAP chlorophyll-a and Open-Meteo marine conditions, estimates harmful algal bloom severity and drift near a coastal area of interest, and sends Slack alerts plus a Gmail report (with a generated PDF when available).

How it works

  1. Runs every 6 hours on a schedule and loads the configured area of interest, thresholds, facility list, and notification settings.
  2. Fetches the latest chlorophyll-a grid for the AOI from NOAA CoastWatch ERDDAP, plus ocean current/temperature data and wind forecasts from Open-Meteo.
  3. Validates data freshness/coverage, calculates bloom severity (watch/warning/critical) from chlorophyll intensity and area, and predicts drift for the configured forecast horizon.
  4. Estimates exposure for each configured facility by checking when predicted bloom pixels come within the impact radius and generates recommended actions per facility type.
  5. Decides whether to notify (alert, reminder/escalation, all-clear, or data-gap) using persisted state across runs to avoid noisy notifications.
  6. For alert notifications, downloads an Esri World Imagery basemap, renders a map and facility table into HTML, converts it to a PDF via PDFEndpoint, and emails the report through Gmail (falling back to an email without PDF if conversion fails).
  7. Posts the appropriate message to Slack (alert/all-clear/data-gap), optionally sends a dead-man heartbeat URL, and posts a separate Slack message if the workflow errors.

Setup

  1. Add credentials for Gmail OAuth2 (to send the report email), Slack OAuth (to post alerts), and an HTTP Bearer token for PDFEndpoint (to convert HTML to PDF).
  2. Update the AOI settings in the configuration step (region name, bounding box/center coordinates, chlorophyll thresholds, forecast horizon, and the facilities array with lat/lon and categories).
  3. Set your notification targets by filling in the recipient email address and Slack channel ID(s), and optionally provide a heartbeat URL for external uptime monitoring.