Hourly airport delay dashboard with Slack alerts

By General Input

Log hourly delay snapshots for your hub airport to Google Sheets and ping Slack the moment delays or cancellations spike.

Integrations

  • AeroDataBox
  • Google Sheets
  • Slack

Type

Deterministic Code

Categories

  • Operations

Build me a deterministic, code-shaped workflow that runs every hour on a cron schedule and logs an airport delay dashboard for a configured hub airport, with Slack alerts when conditions get severe. No reasoning steps. Every node is fixed.

Configurable inputs (with defaults so it works out of the box):

- Airport IATA code (default JFK)

- Google Sheets spreadsheet ID and sheet/tab name to append rows to

- Slack channel ID for alerts

- Delay index alert threshold (default 7, on AeroDataBox's 0-10 scale)

- Cancellation alert threshold (default more than 5 cancellations in the upcoming three-hour window)

Trigger: cron, every hour at minute 0.

Step 1. Call AeroDataBox "Get Airport Delay Snapshot" (operation id 95b1fdc5-eca2-4a59-8bdb-e4da90f0bfe1) for the configured airport at the current UTC moment. From the response capture: delay index, percent on-time, and average delay in minutes.

Step 2. Call AeroDataBox "Get Airport Flights (Relative)" (operation id 9396cb66-6922-40af-af00-4330b3d58753) for the same airport with offsetMinutes=0 and durationMinutes=180 to pull the next three hours of departures and arrivals. From the response compute: total departures in the window, total arrivals in the window, and a count of flights whose status indicates delayed or cancelled.

Step 3. Format one row with these columns in this order: timestamp (ISO 8601 UTC), airport code, delay index, percent on-time, average delay minutes, total departures in window, total arrivals in window, count of flights currently flagged delayed or cancelled.

Step 4. Call Google Sheets "Append Values" (operation id b8bb536a-33b9-455a-a00b-a652450a6431) on the configured spreadsheet and sheet name to append that single row. Use valueInputOption USER_ENTERED so timestamps and numbers render natively.

Step 5. Threshold check (pure boolean, no LLM). Trigger an alert if delay index is greater than or equal to the configured threshold OR the cancellation count exceeds the configured cancellation threshold. Otherwise stop.

Step 6. If the alert fires, call Slack "Send a Message" (operation id 4c21e1ee-4d54-4413-a4f2-80a80dff4c99) to post a structured message to the configured channel. Include: airport code, current delay index out of 10, percent on-time, average delay minutes, total flights in the next three hours, cancellation count, the row's timestamp, and a permalink to the Google Sheet. Use Slack mrkdwn formatting (single asterisks for bold, angle-bracket links).

Implementation notes: keep every step explicit and deterministic, no agent reasoning. The threshold check is a plain comparison. If either AeroDataBox call returns an error (most often HTTP 429 from rate limits, or 451 for blocked regions), log it and skip the append/alert steps for that run rather than retrying inline. The sheet headers should be created on first install if the sheet is empty.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats