Skip to content

On a schedule

Get yesterday's Stripe revenue in your inbox each morning

Every morning you get one email with yesterday's sales, refunds and new subscriptions, plus a two-line summary.

Runs
On a schedule
Apps
Gmail, Stripe
AI
Optional
Access
Stripe read; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every morning at 7, email me yesterday's Stripe sales, refunds and new subscriptions with a short AI summary.

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

The owner of a small subscription business checks the Stripe dashboard most mornings, clicks through payments, then refunds, then subscriptions, and tries to remember whether yesterday was good compared with last week. On busy days she skips it, and a run of refunds or a quiet sales day goes unnoticed until the monthly numbers come in.

This automation puts the numbers in her inbox before she starts work: gross sales, refunds, new subscriptions and new customers for the previous day, with a two-line summary that points out anything unusual. It is quick to read on a phone and builds a daily record she can search later.

What you get out of it

  • Numbers without logging in

    The day's figures arrive by email, so there is no dashboard to open.

  • Problems surface early

    A jump in refunds or a quiet day is visible the next morning, not at month end.

  • A plain summary on top

    Two sentences say what stood out, so the email is useful in ten seconds.

  • A searchable record

    Each day's email stays in Gmail, so you can look back at any date.

  • Multi-currency totals

    Sales and refunds are totalled per currency rather than mixed together.

How it works

What happens, step by step

  1. Every morning at the time you choose, ClickRuntime collects yesterday's payments, refunds and new subscriptions from Stripe.

  2. It adds them up per currency and counts new customers.

  3. AI writes a two-line summary of what stood out.

  4. The totals and summary are emailed to you from your Gmail.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Stripe

What you get

RunsOn a schedule
Get yesterday's Stripe revenue in your inbox each morningtoday, 9:00Succeeded
Email · Morning digestSales EUR: 3,412.00 · Refunds EUR: 89.00 · New subscriptions: 7. A strong day, with sales about a third higher than a typical Tuesday.

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 Gmail 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_digest_in_gmail.pyexample
import base64
from email.message import EmailMessage
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

def send(to, subject, text):
    msg = EmailMessage(); msg["To"], msg["Subject"] = to, subject; msg.set_content(text)
    g = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    g.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()

@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)
    span = {"gte": int((end - timedelta(days=1)).timestamp()), "lt": int(end.timestamp())}
    totals = defaultdict(int)
    for c in stripe.Charge.list(created=span, limit=100).auto_paging_iter():
        totals[f"Sales {c.currency.upper()}"] += c.amount if c.paid else 0
    for r in stripe.Refund.list(created=span, limit=100).auto_paging_iter():
        totals[f"Refunds {r.currency.upper()}"] += r.amount
    lines = [f"{k}: {v / 100:,.2f}" for k, v in totals.items()]
    lines.append(f"New subscriptions: {len(stripe.Subscription.list(created=span, status='all', limit=100).data)}")
    summary = ai.generate("Summarise yesterday's revenue in two sentences:\n" + "\n".join(lines), max_output_tokens=120).text
    send("me@example.com", f"Stripe revenue for {(end - timedelta(days=1)).date()}", summary + "\n\n" + "\n".join(lines))
    return {"lines": len(lines)}

FAQ

Common questions

Which day does the email cover?
The previous calendar day, midnight to midnight, in the time zone you choose when setting it up.
Does it include subscription renewals?
Yes. Renewal payments are counted in sales. New subscriptions are listed separately so growth is easy to see.
Can it go to my co-founder too?
Yes. Give your AI assistant the extra addresses and the email is sent to all of them from your Gmail.
What permissions does it need?
Stripe read; gmail.send. 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 “Get yesterday's Stripe revenue in your inbox each morning” from your assistant

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