Weekly Cap credit tracker in Google Sheets with low-balance Slack alert
Every Monday at 8am, log your Cap balance and recording stats to a Google Sheet, and ping Slack when credits drop below your threshold.
Every Monday at 8am, run a weekly Cap credit health check that logs to Google Sheets and alerts Slack when credits are low. Build this as a code workflow on a cron trigger. Every step is deterministic, no fuzzy decisions.
Top-level workflow inputs: the Google Sheets spreadsheet ID, the tab name in that sheet (default Cap Usage), the Slack channel to alert (default #finance-ops), and the low-balance threshold in dollars (default 25).
Step 1. Call Cap Get Usage to read balanceMicroCredits, total recordings count, and total minutes processed for the app.
Step 2. Convert balanceMicroCredits to dollars by dividing by 100,000 (per Cap docs: 100,000 micro-credits = $1). Round to two decimal places.
Step 3. Call Google Sheets Get Values to read the existing rows in the tracking tab (range like 'Cap Usage!A:D'). Find the most recent prior balance (the last data row's balance column) so you can compute the weekly burn rate as priorBalance minus currentBalance. If there is no prior row, mark the burn rate as not yet available.
Step 4. Call Google Sheets Append Values to add a new row to the same tab with: today's date (ISO), current balance in dollars, total recordings, and total minutes processed. This builds the longitudinal record.
Step 5. If the current balance in dollars is below the threshold input, call Slack Send a Message to the configured finance channel. The message should include: the current balance in dollars, the weekly burn rate computed in Step 3 (or a note that this is the first week), and a clear call to action to top up Cap credits with a link to https://cap.so/dashboard. If the balance is at or above the threshold, skip the Slack step entirely.
Keep the Slack message short and skimmable. No agent reasoning is needed: every branch and computation is deterministic, which is why this is a code workflow.
Additional information
What does this prompt do?
- Every Monday at 8am, reads your current Cap credit balance and aggregate recording stats (total recordings and total minutes processed).
- Appends a new row to a Google Sheet you choose, with the date, balance in dollars, total recordings, and total minutes, so you build up a clean longitudinal record of usage week over week.
- Reads the previous row in the same sheet to compute your weekly burn rate (last week minus this week, in dollars).
- If your balance falls below a configurable threshold (default $25), posts a Slack message to your finance channel with the balance, the weekly burn rate, and a clear call to action to top up Cap credits.
What do I need to use this?
- A Cap account and a developer Secret Key from the Cap dashboard (starts with csk_).
- A Google account connected to General Input, plus the Google Sheet you want to log into (a tab named something like Cap Usage works well).
- A Slack workspace and the name of the channel where low-credit alerts should land (for example, #finance-ops).
- A balance threshold in dollars at which the Slack alert should fire (defaults to $25).
How can I customize it?
- Change the schedule (run daily, biweekly, or on a different day of the week).
- Adjust the low-balance threshold, or send the alert to a direct message instead of a channel.
- Add more columns to the sheet (for example, a notes column, or a copy of the raw micro-credit balance for auditing).
Frequently asked questions
How is my Cap balance turned into dollars?
What happens on the first run when there is no previous row to compare against?
Will it send a Slack message every week?
Can I track more than one Cap app in the same sheet?
Why use a Google Sheet instead of just posting to Slack each week?
Related templates
Stop finding out you ran out of Cap credits mid-recording.
Connect Cap, Google Sheets, and Slack once, and Geni logs your weekly balance and pings finance the moment credits dip below your threshold.