Skip to content

Daily

Email renewal reminders from your Supabase subscriptions

Every morning, customers whose subscription renews within 7 days get a reminder email, and you get a list of the at-risk ones.

Runs
Daily
Apps
Gmail, Supabase
AI
Optional
Access
Supabase read+write; Gmail send

Send this to your assistant

Create a ClickRuntime automation: every morning, find subscriptions in Supabase renewing within 7 days and email each customer a reminder from Gmail, mark them as reminded, and email me a list of the at-risk ones.

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

Surprise renewals cause refund requests, chargebacks and angry emails. A short reminder a week before is good practice, and in some places a legal requirement, but a small SaaS built on Supabase rarely has a lifecycle email tool set up.

A daily check of upcoming renewals sends each customer one reminder from your Gmail, and flags accounts that look at risk so you can reach out personally before they cancel.

What you get out of it

  • Fewer surprise charges

    Customers know a renewal is coming, which cuts refund requests and chargebacks.

  • One reminder each

    The reminded date is saved on the row, so no one is emailed twice.

  • A heads-up on churn

    You get a list of renewing customers who look at risk, while there's still time to talk to them.

  • Uses your own data

    Works straight from your subscriptions table, no extra email tool needed.

How it works

What happens, step by step

  1. Every morning, ClickRuntime asks Supabase for subscriptions renewing in the next 7 days that haven't been reminded yet.

  2. It emails each customer a reminder with their plan and renewal date from your Gmail address.

  3. It records the reminder date on each row so nobody gets a second email.

  4. You get an email listing renewing customers who haven't logged in recently.

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 Supabase

What you get

RunsDaily
Email renewal reminders from your Supabase subscriptionstoday, 9:00Succeeded
Email · At-risk renewals2 renewing customers look at risk: ops@acme.com – Team, renews 2026-10-24, last login 2026-08-30

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 Supabase 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.
scheduled_reminders_and_alerts_from_supabase_records.pyexample
import base64
from email.message import EmailMessage
from datetime import date, timedelta
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, notify
SUPABASE = "https://your-project.supabase.co/rest/v1"

def sb(method, path, **kw):
    key = credentials.secret("SUPABASE_KEY")
    r = http.request(method, f"{SUPABASE}/{path}", **kw, headers={"apikey": key, "Authorization": f"Bearer {key}", "Prefer": "return=representation,resolution=merge-duplicates"})
    return r.raise_for_status() or (r.json() if r.content else None)

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

@on_trigger
def run(event):
    today = date.today()
    subs = sb("GET", f"subscriptions?renews_at=lte.{today + timedelta(days=7)}&renews_at=gte.{today}&reminded_at=is.null")
    for s in subs:
        send(s["email"], f"Your {s['plan']} plan renews on {s['renews_at']}",
             f"Hi,\n\nA quick note: your {s['plan']} plan renews on {s['renews_at']} for {s['price']}. "
             "Nothing to do if you'd like to continue. Reply to this email with any questions.")
        sb("PATCH", f"subscriptions?id=eq.{s['id']}", json={"reminded_at": str(today)})
    risky = [s for s in subs if not s.get("last_login") or s["last_login"][:10] < str(today - timedelta(days=30))]
    if risky:
        notify.email_me(f"{len(risky)} renewing customers look at risk",
                        "\n".join(f"{s['email']} – {s['plan']}, renews {s['renews_at']}, last login {s.get('last_login') or 'never'}" for s in risky))
    return {"reminded": len(subs), "at_risk": len(risky)}

FAQ

Common questions

What counts as at risk?
By default, customers who haven't logged in for 30 days. If AI is available it can also write a one-line note on each.
Can I change the wording?
Yes. Give your AI assistant the reminder text, including the plan, price and renewal date.
Which columns does it use?
The customer's email, renewal date, plan, last login and a reminded date column. Your own column names work too.
What permissions does it need?
Supabase read+write; 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 (daily). 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 renewal reminders from your Supabase subscriptions” from your assistant

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