Automations
Weekly metrics report automation
Monday morning: your KPIs vs last week, computed from the exports, anomalies flagged.
Last reviewed July 17, 2026
A cron automation recipe that computes your weekly metrics from Drive exports with code execution, compares to prior weeks, and flags anomalies.
Schedule: Mondays at 09:00
0 9 * * 1Automation instructions
Read the latest exports in /Metrics/exports (I drop weekly CSVs there). Using code execution, compute the KPIs defined in /Metrics/definitions.md; never recompute a metric differently than its definition. Produce /Metrics/report-YYYY-MM-DD.md: (1) the KPI table: this week, last week, 4-week average, delta; (2) anomalies: anything moving more than its normal range, with the computation shown; (3) one chart-worthy fact stated in words. Where an export is missing or a column changed, report that as the headline instead of computing around it silently. Keep prose under 15 lines; the table carries the numbers.
Set it up
- 1
Set up the folder contract
Create /Metrics/exports for the weekly CSVs and /Metrics/definitions.md defining each KPI's formula and filters.
- 2
Copy the instructions
The definitions file is what makes week 12 comparable to week 2; write it once, precisely.
- 3
Create the automation and bound it
Set the run budget; computation on a few CSVs costs cents per run.