Skip to content

On a schedule

Sync active Stripe subscriptions to Google Sheets

A Subscriptions tab is rewritten every night with each live Stripe subscription: customer, plan, monthly amount, status and next renewal.

Runs
On a schedule
Apps
Google Sheets, Stripe
AI
Not needed
Access
Stripe secret or restricted key (read subscriptions, customers); Google Sheets read+write

Send this to your assistant

Create a ClickRuntime automation: every night at 2am, rewrite the Subscriptions tab of my sheet with all active, trialing and past-due Stripe subscriptions: customer email, plan, monthly amount, status and renewal date, plus a total MRR row.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Stripe's own dashboard shows MRR, but the moment you want to sort customers by value, add a column for account owner or join subscriptions with other data, you need the list in a spreadsheet.

This automation rebuilds a Subscriptions tab every night from Stripe, with each live subscription's customer, plan, monthly value, status and renewal date, sorted from the biggest account down.

Founders, customer success managers and finance leads use it as the starting point for renewal calls, churn reviews and board updates.

What you get out of it

  • Always current

    The tab is rebuilt every night, so cancelled subscriptions disappear and new ones appear without manual exports.

  • Biggest accounts first

    Rows are sorted by monthly amount, which makes the top of the sheet your key accounts list.

  • Upcoming renewals at a glance

    The renewal date column makes it simple to filter for subscriptions renewing in the next 30 days.

  • Past-due customers stand out

    Past-due subscriptions stay on the list with their status, so they can be chased before they cancel.

  • Ready for your own formulas

    Other tabs can look up customers here for segment reports or forecasts.

How it works

What happens, step by step

  1. Every night ClickRuntime pages through all your Stripe subscriptions.

  2. It keeps active, trialing and past-due ones and converts yearly or weekly prices to a monthly amount.

  3. The Subscriptions tab is cleared and rewritten with one row per subscription and a total monthly recurring revenue line at the bottom.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Stripe

What you get

RunsOn a schedule
Sync active Stripe subscriptions to Google Sheetstoday, 9:00Succeeded
Google Sheets · Metrics › Subscriptionsanna@brightlabs.io | Team (yearly) | 82.50/mo | active | renews 2027-03-14 … Total MRR | 18,940.00

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and Stripe steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
sync_active_stripe_subscriptions_to_google_sheets.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, report_fetched

SHEET_ID = "your-spreadsheet-id"
KEEP = {"active", "trialing", "past_due"}
PER_MONTH = {"day": 30, "week": 52 / 12, "month": 1, "year": 1 / 12}

@on_trigger
def run(event):
    key, subs, after = credentials.secret("STRIPE_API_KEY"), [], None
    while True:
        params = {"status": "all", "limit": 100, "expand[]": "data.customer", **({"starting_after": after} if after else {})}
        page = http.get("https://api.stripe.com/v1/subscriptions", params=params, auth=(key, "")).json()
        subs += [s for s in page["data"] if s["status"] in KEEP]
        if not page["has_more"]:
            break
        after = page["data"][-1]["id"]
    report_fetched(len(subs))
    rows, mrr = [], 0.0
    for s in subs:
        monthly = 0.0
        for item in s["items"]["data"]:
            rec = item["price"]["recurring"]
            monthly += (item["price"]["unit_amount"] or 0) / 100 * item.get("quantity", 1) * PER_MONTH[rec["interval"]] / rec["interval_count"]
        mrr += monthly if s["status"] != "trialing" else 0
        renew = datetime.fromtimestamp(s["items"]["data"][0]["current_period_end"], timezone.utc).date().isoformat()
        plan = s["items"]["data"][0]["price"].get("nickname") or s["items"]["data"][0]["price"]["id"]
        rows.append([s["customer"].get("email") or s["customer"]["id"], plan, round(monthly, 2), s["status"], renew, s["id"]])
    rows.sort(key=lambda r: -r[2])
    values = [["Customer", "Plan", "Monthly amount", "Status", "Renews", "Subscription"]] + rows + [["Total MRR", "", round(mrr, 2)]]
    tab = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
    tab.clear(spreadsheetId=SHEET_ID, range="Subscriptions!A:F").execute()
    tab.update(spreadsheetId=SHEET_ID, range="Subscriptions!A1", valueInputOption="USER_ENTERED", body={"values": values}).execute()
    return {"subscriptions": len(rows), "mrr": round(mrr, 2)}

FAQ

Common questions

How is the monthly amount worked out?
Each subscription item's price is multiplied by its quantity and converted to a month, so a 990 per year plan shows 82.50. Discounts and coupons are not subtracted in this version; ask your assistant to apply them if you use many.
Are trials counted in MRR?
Trialing subscriptions are listed so you can see who is about to convert, but they are left out of the total MRR line until they start paying.
Why rewrite the tab instead of appending?
The tab is meant to be a current snapshot. If you want history, ask your assistant to also append the date and total MRR to a second tab each night.
What permissions does it need?
Stripe secret or restricted key (read subscriptions, customers); Google Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Sync active Stripe subscriptions to Google Sheets” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.