Log an airport's daily departures to a Google Sheet

By General Input

Every night, automatically record every departure from your chosen airport to a spreadsheet so you can track delays and on-time performance over time.

Integrations

  • AviationStack
  • Google Sheets

Type

Deterministic Code

Categories

  • Operations

Every night at 11pm, log the day's flight activity for a specific airport to a Google Sheet so the team can keep a record and analyze on-time performance over time. Run this on a cron schedule (daily at 11pm, in the airport's local time zone). This is a deterministic log with no summarization, prioritization, or reasoning: one appended row per flight, every day.

First, pull today's departures from the target airport using AviationStack's Get Flights (Real-time and Historical) operation, filtered by the departure airport IATA code (the dep_iata parameter). Set the airport code as a configurable input near the top of the workflow, for example JFK. AviationStack authenticates by sending the access key as the access_key query parameter on every request, and the real-time flights endpoint is available on all plans.

For each flight in the response data array, map these fields: flight number (flight.iata, falling back to flight.number), airline (airline.name), destination (arrival.iata or arrival.airport), scheduled departure time (departure.scheduled), actual or estimated departure time (departure.actual, falling back to departure.estimated when the actual time is not yet reported), status (flight_status), and delay in minutes (departure.delay). When a value is missing, write an empty cell rather than skipping the flight, so every departure still produces exactly one row.

Then append one row per flight to the Google Sheet using the Append Values operation. Target a single tab (for example a tab named Flight Log) and include a date column so each night's flights are date-stamped for trend analysis. Keep a consistent column order: date, flight number, airline, destination, scheduled departure, actual or estimated departure, status, delay in minutes. Use the USER_ENTERED input option so times and numbers are stored as real values that can be charted and pivoted.

Handle pagination. AviationStack returns results in pages via the limit and offset parameters (default and maximum of 100 results per page below the Professional plan). If the airport is a large hub with more than 100 departures in a day, page through by increasing offset until all flights for the day are collected, then append them all. Note that the AviationStack Free plan is HTTP-only and capped at roughly 100 requests per month, so a busy hub may require a paid plan to cover the daily volume.

The result is a consistent daily record, one row per flight, that the team can use to track delay trends and on-time rates over time without any manual data entry.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet 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 boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads