Apify Actor Run Failure Sentinel
Audit an Apify actor's most recent run status, alert Slack when it failed, timed out, or was aborted, and optionally launch a fresh retry run under a cost cap.
Pull the public USGS earthquake feed, list magnitude 4.5+ events in DuckDB, and log when any event reaches magnitude 6. No API key.
A morning check for anyone who wants the last day of notable earthquakes without signing up for a feed. This blueprint downloads the public USGS GeoJSON API, uses DuckDB to turn each feature into a row, writes a CSV, and logs a different line when the strongest event is magnitude 6 or higher.
io.kestra.plugin.core.trigger.Schedule trigger runs every day at 08:00 UTC (cron: "0 8 * * *").download_quakes (io.kestra.plugin.core.http.Download) fetches events with minmagnitude=4.5 since yesterday from earthquake.usgs.gov. The feed is public and needs no key.list_events (io.kestra.plugin.jdbc.duckdb.Query) reads that file with read_json_auto and UNNESTs features. Each row has magnitude, place, time, title, and the USGS event URL. fetchType: STORE keeps the full list.strongest runs a second DuckDB query with fetchType: FETCH_ONE and returns quake_count and max_magnitude.flag_strong (io.kestra.plugin.core.flow.If) logs a strong-earthquake line when max_magnitude >= 6, and a quiet-day line otherwise.to_csv (io.kestra.plugin.serdes.csv.IonToCsv) converts the stored list into a CSV on the execution.The USGS API is a request/response endpoint. It does not run tomorrow on its own, and it does not branch when a large event shows up. Kestra supplies the daily schedule, the download, the SQL, the magnitude check, and the CSV in one flow, with the execution history kept for each morning.
earthquake.usgs.gov.None. The USGS feed is public. DuckDB does not need a connection string.
to_csv and download the CSV. Read log_strong or log_quiet for the magnitude 6 check.minmagnitude in the URL, or the >= 6 condition, to match what you care about.then branch.starttime at a longer window if a daily file is too small.