Skip to content

On a schedule

Get yesterday's signups and orders by email

Each morning you see how many rows were added to your key tables the day before, compared with the day prior.

Runs
On a schedule
Apps
Supabase
AI
Not needed
Access
secret key (read)

Send this to your assistant

Create a ClickRuntime automation: every day at 8am, email me how many rows were added yesterday to my Supabase users and orders tables, and how that compares with the day before.

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 founder with a product on Supabase wants to know how many people signed up yesterday and how many orders came in, but the answer lives in the database. Getting it means opening the SQL editor, writing a count query with a date filter and trying to remember whether the figure from the day before was higher. Most days it does not happen, so trends go unnoticed.

Each morning on your schedule, ClickRuntime queries your tables with created_at filters for yesterday, counts rows exactly, compares the results with the previous day and emails you a short summary. You start the day with fresh numbers and a clear sense of whether they are up or down.

It is useful for early-stage products without an analytics stack, and for anyone who wants a daily pulse straight from the source of truth.

What you get out of it

  • You see growth as it happens

    Signups and orders are the heartbeat of a product. Reading them daily means a campaign effect or a sudden drop appears within a day, rather than in a monthly review when it is too late to react.

  • Numbers come straight from your database

    Counts come from the tables themselves, not from a third-party tracker that might miss events or be blocked by browsers. For many early products, that is the most trustworthy figure available.

  • Day-over-day comparison provides context

    A count of 42 means little alone. Seeing it against 31 the day before gives instant meaning, and a run of declining days becomes obvious before it turns into a real problem.

  • No analytics tool is required

    Small teams can skip setting up a dashboard product and still have daily visibility. Adding another table to the email later takes a minute and costs nothing extra in tooling.

  • A permanent daily record builds up

    Each email timestamps the figures, so you accumulate a log of daily counts in your inbox. That is handy when someone asks how many signups you had in March and nobody saved the numbers.

How it works

What happens, step by step

  1. Every morning at 8, ClickRuntime counts the rows added yesterday to each of the Supabase tables you chose, such as users and orders.

  2. It compares each count with the day before.

  3. You get an email with yesterday's numbers and the change for each table.

Before it runs live

  • Connect Supabase

What you get

RunsOn a schedule
Get yesterday's signups and orders by emailtoday, 9:00Succeeded
Email · Daily metricsusers: 48 yesterday (+6 vs the day before) orders: 131 yesterday (-9 vs the day before)

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 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.
get_a_daily_metrics_email_from_my_database.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

SUPABASE_URL = "https://your-project.supabase.co"

def sb_headers(**extra):
    key = credentials.secret("SUPABASE_SECRET_KEY")
    return {"apikey": key, "Authorization": f"Bearer {key}", **extra}

def count(table, start, end):
    resp = http.head(f"{SUPABASE_URL}/rest/v1/{table}", params={"select": "id", "and": f"(created_at.gte.{start},created_at.lt.{end})"},
                     headers=sb_headers(Prefer="count=exact"))
    return int(resp.headers["Content-Range"].split("/")[-1])

@on_trigger
def run(event):
    today = date.today()
    y, d2 = today - timedelta(days=1), today - timedelta(days=2)
    lines = []
    for table in ("users", "orders"):
        now, before = count(table, y, today), count(table, d2, y)
        lines.append(f"{table}: {now} yesterday ({now - before:+d} vs the day before)")
    notify.email_me(f"Database metrics for {y}", "\n".join(lines))
    return {"lines": lines}

FAQ

Common questions

Which tables and counts can it include?
Any table with a timestamp column such as created_at can be counted for yesterday. Typical choices are users, orders, comments or support tickets. You can also add filtered counts, such as paid orders only, by describing the condition to your assistant.
What does count=exact mean here?
It asks Supabase to return the true number of matching rows, instead of an estimate or a page of results. For daily counts, that keeps the figure correct even when the table is large, at a small cost in query time.
Which time zone defines yesterday?
The one you choose when setting it up. Database timestamps are usually in UTC, so the run converts your local day boundaries before filtering. That way late-evening signups in your time zone land on the right day.
What permissions does it need?
secret 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 “Get yesterday's signups and orders by email” from your assistant

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