Log every CircleCI build to a Google Sheet automatically
Automatically record every finished CircleCI workflow in a Google Sheet, building a durable build-history log you can filter, pivot, and chart.
Integrations
CircleCI
Google Sheets
Type
Categories
- Engineering
- Operations
Run this automatically every time a CircleCI workflow finishes on my project, whether it succeeded, failed, or was canceled. Use the CircleCI workflow-completed poll trigger (event type workflow_completed) so the workflow fires exactly once per completed run, with no missed runs and no duplicates.
When a workflow completes, take the workflow ID from the trigger payload and call CircleCI's Get a workflow operation to read its full details: the workflow name, the branch it ran on (from the pipeline), its final status, its start timestamp (created_at) and stop timestamp (stopped_at), and the project slug. Compute the build duration from the start and stop timestamps (stopped_at minus created_at).
Then append one new row to my Google Sheet build-history log using the Append Values operation. Map the columns in this order: project (the CircleCI project slug), workflow name, branch, status, duration, and timestamp (use the stop timestamp, the moment the workflow finished). Use valueInputOption USER_ENTERED so timestamps and durations are stored as real dates and numbers I can pivot and chart, and append after the last row of the existing table so the header row stays intact. I will provide the spreadsheet ID and the tab/range to append to.
This must run deterministically on every completed workflow with no summarization, filtering, or judgement: one finished workflow always produces exactly one appended row. Log every terminal status equally (success, failed, canceled, and any other final state) so the sheet becomes a complete, durable build-history log I can filter, pivot, and chart for build-health reporting and DORA-style metrics like deployment frequency and change failure rate. This is the raw data layer that a weekly AI report or a BI dashboard can later sit on top of.
What it does
- Adds a new row to your Google Sheet every time a build finishes in CircleCI, whether it passed, failed, or was canceled.
- Captures the project, workflow name, branch, status, duration, and the time it finished so nothing gets lost.
- Builds a permanent build-history log you can keep well beyond CircleCI's 90-day reporting window.
- Gives you clean, structured data to pivot, filter, and chart for build-health and DORA-style engineering reports.
What you’ll need
- A CircleCI account with access to the project whose builds you want to track
- A Google account and a Google Sheet to store the build log
- A tab in that sheet with column headers for project, workflow, branch, status, duration, and finish time
How to customize it
- Point it at a different Google Sheet or tab to keep separate logs per project or team.
- Add or reorder the columns you capture, such as the pipeline number or who triggered the build.
- Optionally narrow it to specific branches, like main or release branches, if you only care about those.
Use cases
- Data Sync