Every Monday, reads your metrics sheet and emails a short written briefing on what moved and by how much.
Uses
Claude
Gmail
Google Sheets
Weekly metrics briefing by email
Every Monday at 07:00, the 'Metrics' tab of your spreadsheet is read, one measure per row with this week's and last week's values, and the AI writes a short briefing on what changed, which way and by how much. It is emailed to you with the numbers it was written from underneath.
The briefing is told not to explain why anything moved, because a spreadsheet cannot tell you that and a plausible invented cause is worse than none. It is also told not to estimate, annualise or project, and to call a measure incomplete rather than treat a blank cell as zero. If the sheet has no readable measures you get an email saying so, since an empty sheet usually means something upstream stopped running. If the summary cannot be written, the numbers are sent on their own. Nothing in the sheet is changed.
You need a spreadsheet with a 'Metrics' tab holding 'Measure', 'This week' and 'Last week' columns.
metricsUrl to blank.Set metricsUrl to blank.recipientEmail to blank.Set recipientEmail to blank.metricsTab to Metrics.Set metricsTab to Metrics.maxRows to 100.Set maxRows to 100.metricsUrl. Save it as sheet.Read the rows of metricsUrl. Save it as sheet.lines to an empty list.Set lines to an empty list.measure in sheet.rows:For each measure in sheet.rows:rowErrorIf a step below fails, save the error as rowErrormeasure.Measure and save it as label.Trim measure.Measure and save it as label.label isn't emptyIf label isn't emptylabel: this week measure["This week"], last week measure["Last week"] to the end of lines and save it as lines.Add - label: this week measure["This week"], last week measure["Last week"] to the end of lines and save it as lines.rowError as text.Show in the output: Skipped a metrics row: rowError as text.lines is emptyIf lines is emptyrecipientEmail.Send an email to recipientEmail.
Subject: Weekly briefing - no numbers foundThe metrics sheet had no readable measures this week, so there is no briefing to send. It is worth checking whether whatever fills that sheet is still running.lines with a new line and save it as numbers.Join lines with a new line and save it as numbers.briefingErrorIf a step below fails, save the error as briefingErrornumbers'. Save it as written.
Maximum response length: 700written.response_text and save it as briefing.Trim written.response_text and save it as briefing.recipientEmail.Send an email to recipientEmail.
Subject: Weekly briefingbriefing
---
The numbers this was written from:
numbersrecipientEmail.Send an email to recipientEmail.
Subject: Weekly briefing - numbers onlyThe written summary could not be produced this week, so here are the numbers on their own.
numbers