Skip to content

On a schedule

Send WhatsApp reminders for due dates in Supabase

People with a fee, renewal or appointment coming up get a WhatsApp reminder, and the row is marked so they aren't reminded twice.

Runs
On a schedule
Apps
Supabase, WhatsApp Business
AI
Not needed
Access
Supabase read+write; WhatsApp messaging

Send this to your assistant

Create a ClickRuntime automation: every morning, find rows in our Supabase renewals table due in 3 days that haven't been reminded, send each person our approved WhatsApp reminder, and mark the row reminded.

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

Membership organisations, clinics and subscription businesses lose money and goodwill when people forget a renewal or an appointment. The dates are already in the database, but reminders depend on someone running a query and sending messages.

Reminding each person on WhatsApp a few days before the date, straight from your Supabase records, cuts missed payments and no-shows without anyone working through a list.

What you get out of it

  • Fewer missed payments and visits

    A timely reminder on WhatsApp gets read and acted on.

  • Straight from your data

    Due dates come from your own table, so there's no list to maintain.

  • Never twice

    Each row is marked reminded, so nobody is pestered.

  • Your approved wording

    Reminders use your template, with the person's details filled in.

How it works

What happens, step by step

  1. Every morning it asks Supabase for rows due in three days that haven't been reminded.

  2. Each person gets your approved WhatsApp reminder with their name and date.

  3. The row is marked reminded so the same person isn't messaged again.

Before it runs live

  • Connect Supabase
  • Connect WhatsApp Business

What you get

RunsOn a schedule
Send WhatsApp reminders for due dates in Supabasetoday, 9:00Succeeded
WhatsApp · TemplateHi Morgan, your Northwind Gym membership renews on 22 October. Reply if you'd like to change your plan.

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 Supabase and WhatsApp Business 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.
send_whatsapp_reminders_from_supabase_records.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http

TABLE = "renewals"
SUPABASE_URL = "https://your-project.supabase.co"
sb = lambda: {"apikey": credentials.secret("SUPABASE_SECRET_KEY"), "Authorization": f"Bearer {credentials.secret('SUPABASE_SECRET_KEY')}"}
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"

def wa_template(to, name, params):
    body = {"messaging_product": "whatsapp", "to": to, "type": "template", "template": {"name": name, "language": {"code": "en"},
            "components": [{"type": "body", "parameters": [{"type": "text", "text": str(p)} for p in params]}]}}
    return http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"}, json=body).json()

@on_trigger
def run(event):
    due = (date.today() + timedelta(days=3)).isoformat()
    rows = http.get(f"{SUPABASE_URL}/rest/v1/{TABLE}", headers=sb(),
                    params={"due_date": f"eq.{due}", "reminded": "is.false", "select": "id,name,phone,due_date"}).json()
    sent = 0
    for r in rows:
        res = wa_template(r["phone"], "renewal_reminder", [r["name"], r["due_date"]])
        if "messages" in res:
            http.patch(f"{SUPABASE_URL}/rest/v1/{TABLE}", headers=sb(), params={"id": f"eq.{r['id']}"}, json={"reminded": True})
            sent += 1
    return {"due": len(rows), "sent": sent}

FAQ

Common questions

How far ahead are reminders sent?
Three days before by default. You can choose any number of days, or send on the day.
Can it remind people who missed an appointment?
Yes. Run it more often and look for appointments in the past that weren't attended.
What columns are needed?
Name, phone, due date and a reminded flag.
What permissions does it need?
Supabase read+write; WhatsApp messaging. 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 “Send WhatsApp reminders for due dates in Supabase” from your assistant

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