Skip to content

Your weekly numbers, added to a Google Sheet on their own

Tell your assistant which numbers you track and where they come from. Every week ClickRuntime pulls them from the APIs and appends a row to your sheet, so the chart and history keep themselves up to date.

Your assistantClickRuntime connected
Create a ClickRuntime automation: every Monday at 7:00, add a row to my KPIs sheet with last week's Stripe revenue, new customers and refunds.
I'll total last week's Stripe charges, new customers and refunds every Monday and append one row to the KPIs tab.
Weekly KPIs to SheetsLive
When
Mondays at 7:00 (America/New_York)
Uses
api.stripe.com, Google Sheets
RunsClickRuntime dashboard
  • Mon 7:00✓ Weekly KPIs to Sheets · SucceededLast runMon 7:00 · row 34 added

Can ChatGPT or Claude update a Google Sheet with my numbers every week?

Not by themselves: they can edit a sheet while you chat, but nothing happens next Monday unless you ask again. With ClickRuntime connected, your assistant sets up an automation that pulls the numbers from your tools every week and appends a row to the sheet you picked.

Why the assistant can’t do this on its own

  • A weekly row needs a weekly clock. Assistants have none outside a chat.
  • The numbers live in other tools (Stripe, your database, an analytics API). Fetching them needs your keys, kept somewhere safe between runs, not pasted into a chat.
  • Google access that keeps working week after week needs a stored connection that refreshes itself. ClickRuntime keeps it.

Set it up from your AI assistant

The same steps work in ChatGPT, Claude, Cursor and any assistant that supports MCP connectors.

  1. Step 1Connect ClickRuntime to your assistantAdd ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
  2. Step 2Paste the promptStart a new chat and paste: “Create a ClickRuntime automation: every Monday at 7:00 America/New_York, add a row to the KPIs tab of my sheet “Company metrics” with the week start date, last week's Stripe revenue (succeeded charges minus refunds), number of new customers and number of refunds.” Change the details (times, channels, addresses) to yours.
  3. Step 3Read the draftThe assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
  4. Step 4Connect accounts and save keysThe assistant asks you to connect Google with the picked-files option, and to pick the “Company metrics” sheet, so the automation can open only that file. The Stripe restricted key (read-only) is saved as a secret in the ClickRuntime dashboard.
  5. Step 5Test itThe assistant runs it once and shows the row it added. If the columns don't match your header, it adjusts and you delete the test row.
  6. Step 6Turn it onThe assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
  7. Step 7Check it in the ClickRuntime dashboardEach run shows the values written and the row number. The connections page shows which Google account and which sheet the automation can open.
Prompt to copy.txt

“Create a ClickRuntime automation: every Monday at 7:00 America/New_York, add a row to the KPIs tab of my sheet “Company metrics” with the week start date, last week's Stripe revenue (succeeded charges minus refunds), number of new customers and number of refunds.”

Connector setup for each assistant: ChatGPT, Claude, Claude Code, Cursor, and other assistants.

What the assistant writes

A typical script for this job. Yours matches your pages, accounts and wording, and you can read every version in the ClickRuntime dashboard.

weekly_kpis_to_sheets.pyexample
1from datetime import datetime, timedelta, timezone
2import stripe
3from google.oauth2.credentials import Credentials
4from googleapiclient.discovery import build
5from clickruntime import on_trigger, credentials
6 
7SHEET_ID = "your-spreadsheet-id"
8TAB = "KPIs"
9 
10@on_trigger
11def run(event):
12today = datetime.now(timezone.utc).date()
13start = today - timedelta(days=today.weekday() + 7) # last Monday
14end = start + timedelta(days=7)
15window = {"gte": int(datetime(start.year, start.month, start.day, tzinfo=timezone.utc).timestamp()),
16"lt": int(datetime(end.year, end.month, end.day, tzinfo=timezone.utc).timestamp())}
17 
18stripe.api_key = credentials.secret("STRIPE_RESTRICTED_KEY")
19charges = [c for c in stripe.Charge.list(created=window, limit=100).auto_paging_iter() if c.status == "succeeded"]
20refunds = list(stripe.Refund.list(created=window, limit=100).auto_paging_iter())
21customers = sum(1 for _ in stripe.Customer.list(created=window, limit=100).auto_paging_iter())
22revenue = (sum(c.amount for c in charges) - sum(r.amount for r in refunds)) / 100
23 
24sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("cr_google_sheets_picked", "work")),
25cache_discovery=False).spreadsheets()
26sheets.values().append(spreadsheetId=SHEET_ID, range=f"{TAB}!A:D", valueInputOption="USER_ENTERED",
27body={"values": [[start.isoformat(), revenue, customers, len(refunds)]]}).execute()
28return {"week": start.isoformat(), "revenue": revenue, "customers": customers, "refunds": len(refunds)}
  • The Google connection is the picked-files app, so the automation can open only the sheet you picked.
  • Totals are plain code. No AI is needed for sums, so none is used.
  • Amounts from Stripe are in cents; the script converts to your currency's units. One currency is assumed; ask the assistant to split by currency if you sell in several.

A schedule, not a trigger link

A weekly schedule. For a daily row, ask for “every day at 6:00”; for monthly, “on the 1st at 6:00”.

Limits

  • The automation opens only the sheets you pick when connecting Google. A 403 or 404 means the sheet wasn't picked; the dashboard gives you the link to pick it.
  • Very large data pulls should be summarised in the script, not written row by row.

Troubleshooting

The run fails with 404 on the sheet.

The sheet wasn't picked for the connection. Open the automation's connection in the ClickRuntime dashboard, choose files, and pick the sheet.

Numbers don't match Stripe's dashboard.

Stripe's dashboard may use your local timezone and net of fees. Tell your assistant which definition you want and it adjusts the window or the sum.

What you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

  • Any app or API

    Add Shopify orders and average order value to the same row

    “Add to my weekly KPIs automation: Shopify order count and average order value for the same week, in new columns.”
  • Built-in AI

    Write a two-line commentary on the week in the last column

    “Change my weekly KPIs automation so it adds a two-line comment comparing this week with the last four weeks.”
  • Multi-step logic

    Highlight a drop of more than 20% and email you

    “Change my weekly KPIs automation so if revenue is more than 20% below last week, it emails me.”
  • Schedules

    Add a monthly summary tab on the 1st

    “Add to my weekly KPIs automation: on the 1st of each month, add a row to a Monthly tab with last month's totals.”
  • Memory between runs

    Fill in missed weeks if a run ever fails

    “Change my weekly KPIs automation so it remembers the last week written and fills in any missed weeks on the next run.”
  • Any app or API

    Post the new row to Slack when it's added

    “Add to my weekly KPIs automation: post the week's numbers to #leadership in Slack after adding the row.”

Can ChatGPT update a Google Sheet automatically?

With ClickRuntime connected, yes. ChatGPT sets up an automation that adds rows on a schedule, after the chat is closed.

Can Claude pull data into Google Sheets every week?

Yes, through ClickRuntime. Claude writes the automation; it runs on ClickRuntime's servers.

Does it get access to all my Google Drive?

No. With the picked-files connection it can open only the sheets you pick, plus any it creates.

Where do my API keys go?

Into the ClickRuntime dashboard as secrets. They never go into the chat.

How is this different from Apps Script?

Apps Script runs inside Google and you write JavaScript yourself. Here your assistant writes Python that can call any API, with keys kept out of the sheet. See the Google Apps Script comparison.

What can I add later?

Shopify numbers, AI commentary, drop alerts or a monthly tab. See Extend it.

Other use cases

Set up your first automation in ChatGPT or Claude

Free plan. No credit card.

Server URLhttps://clickruntime.com/api/mcp