Skip to content

On a schedule

Log daily Stripe revenue in a sheet with a running forecast

Each morning yesterday's gross, fees, refunds and net per currency are added to your sheet, and you get a 30-day forecast by email.

Runs
On a schedule
Apps
Google Sheets, Stripe
AI
Optional
Access
Stripe read balance; sheet editor

Send this to your assistant

Create a ClickRuntime automation: every morning at 6, add yesterday's Stripe gross, fees, refunds and net per currency to my revenue sheet and email me a 30-day forecast.

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

A bootstrapped software company runs its finances from a Google Sheet: cash, runway, hiring plans. Revenue is the one number that has to be fetched from Stripe by hand, and the export never quite matches because of fees, refunds and two currencies. So the sheet is updated monthly at best, and the runway figure is always a few weeks out of date.

This automation adds one reconciled row per currency each morning, using Stripe's balance records so gross, fees, refunds and net match what actually reaches the bank. With a daily history building up in the sheet, AI writes a short 30-day forecast and emails it to you, so the plan in the sheet stays based on current numbers.

What you get out of it

  • Numbers that match the bank

    Rows are built from Stripe's balance records, so fees and refunds are already taken out of net.

  • Kept separate by currency

    Each currency gets its own row, so EUR and USD are never added together.

  • Always up to date

    A new row arrives every morning without anyone exporting anything.

  • A forecast you can act on

    A short 30-day projection by email, based on the history in your sheet.

  • Works with your own formulas

    Because the data is in your sheet, runway, charts and pivot tables update on their own.

How it works

What happens, step by step

  1. Every morning at the time you choose, ClickRuntime collects yesterday's Stripe balance activity.

  2. It totals gross, fees, refunds and net for each currency.

  3. One row per currency is added to your revenue sheet.

  4. AI reads the recent history in the sheet and you get a short 30-day forecast by email.

Before it runs live

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

What you get

RunsOn a schedule
Log daily Stripe revenue in a sheet with a running forecasttoday, 9:00Succeeded
Email · Morning digestEUR: net 2,187.40 · USD: net 940.15. At the current pace, net for the next 30 days is about 64,000 EUR and 27,500 USD, slightly up on last month.

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
  • Change what the AI looks for, or how it writes the result
  • 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.
daily_revenue_log_and_forecast.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta, timezone
from collections import defaultdict
import stripe
from clickruntime import on_trigger, credentials, ai, notify

SHEET_ID = "your-sheet-id"

@on_trigger
def run(event):
    stripe.api_key = credentials.secret("STRIPE_API_KEY")
    end = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0, microsecond=0)
    day = (end - timedelta(days=1)).date().isoformat()
    t = defaultdict(lambda: {"gross": 0, "fees": 0, "refunds": 0, "net": 0})
    for b in stripe.BalanceTransaction.list(created={"gte": int((end - timedelta(days=1)).timestamp()), "lt": int(end.timestamp())}, limit=100).auto_paging_iter():
        row = t[b.currency.upper()]
        row["refunds" if b.type == "refund" else "gross"] += b.amount
        row["fees"] += b.fee
        row["net"] += b.net
    rows = [[day, cur] + [v[k] / 100 for k in ("gross", "fees", "refunds", "net")] for cur, v in t.items()]
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
    if rows:
        sheets.values().append(spreadsheetId=SHEET_ID, range="Revenue!A:F", valueInputOption="USER_ENTERED", body={"values": rows}).execute()
    history = sheets.values().get(spreadsheetId=SHEET_ID, range="Revenue!A:F").execute().get("values", [])[-120:]
    forecast = ai.generate("From these daily rows (date, currency, gross, fees, refunds, net), forecast net revenue for the next 30 days per currency in 3 sentences:\n"
                           + "\n".join(",".join(map(str, r)) for r in history), max_output_tokens=200).text
    notify.email_me(f"Revenue for {day} and 30-day forecast", "\n".join(f"{r[1]}: net {r[5]:,.2f}" for r in rows) + "\n\n" + forecast)
    return {"rows": len(rows)}

FAQ

Common questions

Why balance transactions rather than payments?
They include Stripe's fees and refunds, so the net figure is what you actually receive. That makes reconciliation with your bank much simpler.
How is the forecast made?
AI looks at the recent daily rows in your sheet and projects the next 30 days, with a sentence on the trend. Treat it as a guide for planning, not an accounting figure.
Can the forecast go to Slack instead?
Yes. Ask your AI assistant to post it to a channel such as #finance instead of, or as well as, emailing you.
What permissions does it need?
Stripe read balance; sheet editor. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “Log daily Stripe revenue in a sheet with a running forecast” from your assistant

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