Append daily metrics to a Google Sheet from any data source
Quando usar: You want a lightweight dashboard in Sheets fed by whatever the agent can reach (Sentry, Stripe, a DB).
Pré-requisitos
- Google service account with Sheets + Drive API enabled — console.cloud.google.com → create SA → download JSON → set SERVICE_ACCOUNT_PATH
- Sheet shared with the SA email — Sheets UI → Share → add [email protected] as Editor
Fluxo
-
Identify the target sheetUse mcp-google-sheets to find the spreadsheet titled 'Daily KPIs'. Return its ID.✓ Copiado→ Spreadsheet ID
-
Append today's rowAppend a row to sheet 'summary' with columns [date, signups, mrr, errors]. Use today's values from [your source].✓ Copiado→ add_rows confirms row appended at the bottom
-
Update a chart if neededVerify the trailing-30d chart picked up the new row; if not, refresh it.✓ Copiado→ Chart shows today's data
Resultado: A live Sheets dashboard updated without opening the file.
Armadilhas
- Rate limit (429) after many single-cell updates — Use
batch_update_cells— one call can modify hundreds of cells - Service account doesn't see the sheet — You must explicitly share the sheet with its email — SAs have no implicit access