Skip to content
WorkflowIntermediateData Automation

Weekly Metrics Digest from a Spreadsheet

Turn a metrics export into a short, factual weekly summary that separates movements from explanations.

AIAI Skills Hub ResearchResearch team Published Apr 5, 2026Updated May 12, 2026 Reviewed May 12, 2026

The problem

Weekly reporting takes an hour of copying numbers into slides, and the narrative often drifts from the data.

A scheduled job reads a CSV export, calculates week-over-week changes with code, and passes only the computed table to the model. The model writes a summary that cites the table and flags missing data.

Let code do the maths

Language models are not calculators. Compute totals, deltas and percentages in Python or in the spreadsheet, then pass a small table of results to the model. This removes an entire class of confident errors.

Separate observation from explanation

A useful digest says: "Activation fell from 41% to 36% (table row 6). The export has no acquisition-channel breakdown, so the cause cannot be determined from this data." It does not say "activation fell because of the new onboarding flow" unless that evidence exists.

Tools and access

Tools

Google Sheets or a database exportPython or an automation platformAn AI APISlack or email

Credentials

  • • AI provider API key
  • • Spreadsheet or database credentials

Requirements

  • A stable export schema
  • Agreed metric definitions
  • A destination channel

Build steps

Follow in order and test each step before connecting the next one.

  1. 1

    Freeze the export schema

    Document column names, types and timezone. Fail loudly if a required column is missing.

  2. 2

    Compute changes in code

    Produce a compact table with current value, previous value, absolute change and percentage change.

    df['change'] = df['value'] - df['value'].shift(1)
    df['pct_change'] = df['change'] / df['value'].shift(1) * 100
  3. 3

    Build the prompt from computed facts

    Pass the table plus definitions. Require the summary to cite row labels for each number it mentions.

  4. 4

    Generate and validate

    Check that every number in the draft appears in the input table. Reject or regenerate if a new number appears.

  5. 5

    Send to a review channel first

    Run in draft mode for four weeks before sending to a wider audience.

Test it before trusting it

Test input

A CSV with columns date, signups, activations, churn_rate, revenue for the last eight weeks, including one week with a missing value.

Expected output

A digest that states the comparison period, reports absolute and percentage changes, calls out the missing week, and avoids inventing causes.

Troubleshooting

The model does arithmetic incorrectly

Compute all changes in code and pass the results as facts. Do not ask the model to calculate.

The summary invents reasons

Instruct it to separate observed changes from hypotheses, and to list hypotheses as questions for the team.

Missing data is silently ignored

Add an explicit null count to the input and require the summary to mention gaps.

Maintenance

Update the metric definitions when tracking changes. Re-run the previous week after schema changes. Keep a copy of each sent digest for comparison.

Related resources