See llms.txt for all machine-readable content.

Back to Templates

Send monthly whale sighting PDF reports with OBIS, GBIF, iNaturalist and Gmail

Quick overview

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

This workflow runs monthly and compiles recent whale sighting data for a configured region by querying OBIS, GBIF, and iNaturalist, then adds current sea conditions from Open-Meteo, generates a PDF report with a satellite map, and sends it via Gmail with a Slack alert.

How it works

  1. Runs on a monthly schedule at 7:00 AM (or manually for testing) and loads the region center point, radius, lookback window, and recipient email.
  2. Calculates a bounding box and date range for the search window.
  3. Fetches cetacean occurrence records from OBIS and GBIF and recent geotagged observations from iNaturalist for the same area and dates.
  4. Retrieves current wave height, wave period, and sea surface temperature from the Open-Meteo Marine API for the region center.
  5. Normalizes, de-duplicates, and clusters sightings, summarizes species counts, selects a hotspot and top-reported species, and prepares map overlay geometry.
  6. If no sightings are found, the workflow ends; otherwise it pulls a Wikipedia summary for the top species and downloads Esri World Imagery satellite tiles for the report map.
  7. Builds an HTML report, converts it to a PDF using PDFEndpoint, downloads the PDF, emails it via Gmail, and posts a summary alert to a Slack channel.

Setup

  1. Add a Gmail OAuth2 credential and set the recipient email and subject/content settings as needed.
  2. Add a Slack API credential and choose the target channel for the alert message.
  3. Add a PDFEndpoint bearer token credential for the HTML-to-PDF conversion API.
  4. Update the region configuration values (latitude/longitude, radius, and lookback days) to match your target whale-watching area.