What it does
- Pulls every monitor from your Better Stack account once a day
- Writes each monitor's current status, 24-hour uptime, 30-day uptime, and 30-day incident count to a shared Google Sheet
- Gives finance, ops, and customer success a live uptime tracker they can filter, chart, or pivot without a Better Stack seat
- Runs on a schedule you control (defaults to 7am every morning)
The prompt
Paste it into a new chat in General Input, and a specialist builds it with you.
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.
What you'll need
- A Better Stack account with the monitors you care about already set up
- A Google account with edit access to the destination spreadsheet
- A Google Sheet with a tab named Monitors (or your preferred tab name) ready to receive rows
Make it yours
- Change the run time or cadence (hourly, twice a day, weekdays only)
- Point the workflow at a different spreadsheet or a differently named tab
- Add or reorder columns such as monitor group, region, owner team, or a custom SLA target