Skip to content

On a schedule

Email me Stripe subscriptions renewing next week

Every Monday, an email lists the Stripe subscriptions that renew in the next 7 days, with the amount each will be charged and the customer's email.

Runs
On a schedule
Apps
Stripe
AI
Not needed
Access
API key (read)

Send this to your assistant

Create a ClickRuntime automation: every Monday at 9, email me the Stripe subscriptions renewing in the next 7 days, with the customer's email, the amount they'll be charged and the renewal date; put annual plans first.

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

Annual renewals are where a lot of churn and a lot of surprise refunds come from. The customer forgot they signed up a year ago, the card on file has changed, or their finance team needs an invoice in advance.

This automation emails you every Monday with the subscriptions that renew in the coming week, annual plans first, so you can send a heads-up, check the card or prepare an invoice before the charge runs.

It also gives a simple forecast of the cash coming in from renewals over the next seven days.

What you get out of it

  • No surprise charges

    Customers on annual plans can get a reminder from you before they are billed.

  • Fewer refund requests

    A heads-up before renewal heads off "I forgot I had this" emails.

  • A cash forecast

    The total shows what renewals should bring in this week.

  • Skips cancellations

    Subscriptions already set to cancel are not counted.

  • Read only

    Nothing in Stripe is changed.

How it works

What happens, step by step

  1. Every Monday morning, ClickRuntime lists your active Stripe subscriptions.

  2. It keeps the ones whose current period ends in the next 7 days.

  3. It works out the renewal amount from each subscription's prices and quantities.

  4. You get one email with annual renewals first, then monthly ones, and a total.

Before it runs live

  • Connect Stripe

What you get

RunsOn a schedule
Email me Stripe subscriptions renewing next weektoday, 9:00Succeeded
Email · 18 Stripe renewals next week, 6,940.00 USDAnnual: - Tue 11 Nov · finance@ridgeway.com · 2,400.00 USD - Fri 14 Nov · it@lumenhealth.org · 1,188.00 USD Monthly (16): - Mon 10 Nov · ana@pixelmint.io · 49.00 USD - Mon 10 Nov · team@foldline.app · 199.00 USD ... Total: 6,940.00 USD

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 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.
email_me_stripe_subscriptions_renewing_next_week.pyexample
import time
import stripe
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, notify, report_fetched

@on_trigger
def run(event):
    stripe.api_key = credentials.secret("STRIPE_API_KEY")
    now, cutoff = time.time(), time.time() + 7 * 86400
    rows = []
    for sub in stripe.Subscription.list(status="active", limit=100, expand=["data.customer"]).auto_paging_iter():
        items = sub["items"]["data"]
        end = items[0]["current_period_end"] if "current_period_end" in items[0] else sub.get("current_period_end")
        if sub.cancel_at_period_end or not (now <= end <= cutoff):
            continue
        amount = sum((i["price"]["unit_amount"] or 0) * (i.get("quantity") or 1) for i in items) / 100
        rows.append((items[0]["price"]["recurring"]["interval"], end, sub.customer.email, amount, sub.currency.upper()))
    report_fetched(len(rows))
    if not rows:
        return {"renewals": 0}
    fmt = lambda r: f"- {datetime.fromtimestamp(r[1], timezone.utc):%a %d %b} · {r[2]} · {r[3]:,.2f} {r[4]}"
    annual = sorted((r for r in rows if r[0] == "year"), key=lambda r: r[1])
    other = sorted((r for r in rows if r[0] != "year"), key=lambda r: r[1])
    total = sum(r[3] for r in rows)
    body = ("Annual:\n" + ("\n".join(map(fmt, annual)) or "- none") +
            f"\n\nMonthly and other ({len(other)}):\n" + ("\n".join(map(fmt, other)) or "- none") +
            f"\n\nTotal: {total:,.2f} {rows[0][4]}")
    notify.email_me(f"{len(rows)} Stripe renewals next week, {total:,.2f} {rows[0][4]}", body)
    return {"renewals": len(rows)}

FAQ

Common questions

Are subscriptions set to cancel left out?
Yes. Subscriptions marked to cancel at the end of the period will not renew, so they are skipped. Ask for them in a separate section if you want to try to save them.
Does the amount include discounts and tax?
No. It uses the list price times quantity, so coupons, credits and tax are not applied. The real charge appears on the upcoming invoice in Stripe.
I bill in several currencies. Is the total still right?
The script totals in one currency. If you bill in more than one, ask your assistant to group the list and the totals by currency.
What permissions does it need?
API key (read). 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 “Email me Stripe subscriptions renewing next week” from your assistant

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