Daily Better Stack uptime tracker in Google Sheets

By General Input

Post every Better Stack monitor's live uptime and incident count to a shared Google Sheet each morning so anyone can filter, chart, or pivot without a monitoring seat.

Integrations

  • Better Stack
  • Google Sheets

Type

Deterministic Code

Categories

  • Engineering
  • Operations

Every day at 7am, sync the current state of every Better Stack monitor into a Google Sheet so finance, ops, and customer success have a live uptime tracker without needing a Better Stack seat.

Trigger: cron on the org timezone at 07:00 daily.

Step 1. Call Better Stack List Monitors and page through until every monitor is collected. Keep each monitor's id, name (pretty_name or url as fallback), url, status, and last_checked_at.

Step 2. For each monitor, call Better Stack Get Monitor Availability (SLA) twice: once with from/to covering the last 24 hours (now minus 24h to now) and once covering the last 30 days (now minus 30d to now). From each response, take the availability percentage, the total downtime, and the incident count. Round uptime percentages to two decimals when writing the row.

Step 3. Build one row per monitor with these columns in order: name, url, current status, 24h uptime %, 30d uptime %, 30d incident count, last checked timestamp (ISO 8601 in UTC). Also stamp the run time as the first column (labelled Run Date) so the sheet builds up a running history when the workflow runs each day.

Step 4. Call Google Sheets Append Values against the configured spreadsheet, target range Monitors!A:H, valueInputOption USER_ENTERED, and write all rows in one append call. Do not clear existing rows — every run appends, so the tab becomes a time series.

Configuration knobs to expose at the top of the workflow: the Google Sheet spreadsheet id, the target tab name (default Monitors), and the cron expression. Handle rate limits with a short backoff on HTTP 429 from either service. If a monitor's availability call fails, still write the row with the fields that succeeded and leave the failed metrics blank rather than aborting the whole run.

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