Daily
Get your KPI query results every morning
Your saved SQL runs each morning and the results arrive as a table in your inbox.
- Runs
- Daily
- Apps
- BigQuery
- AI
- Not needed
- Access
- read (Job User + Data Viewer)
Send this to your assistant
Create a ClickRuntime automation: every weekday at 7am, run this BigQuery SQL for daily orders, revenue and refunds and email me the results as a table.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Every business has a handful of numbers somebody checks first thing: yesterday's orders, new trials, active subscribers, support tickets opened, revenue against target. If those numbers live in BigQuery, checking means logging into a console or a BI tool, picking the right saved query and waiting for it to load. Some days nobody does it, and a bad day goes unnoticed until the weekly meeting.
Each day at the time you choose, ClickRuntime runs your saved KPI query against BigQuery, turns the returned rows into a readable table and emails it to you or a distribution list. The query is yours, so the figures match the definitions your team already trusts, and the email is waiting before the day starts.
Founders, ops leads and finance managers tend to use it to replace a morning ritual of opening the same dashboard.
What you get out of it
The day starts with the numbers
Having yesterday's KPIs in the inbox before the first meeting means the conversation begins with facts. Nobody burns the first ten minutes asking what the figures were. Meetings start with decisions rather than data requests.
Bad days get noticed on the day
A sharp drop in signups or a spike in refunds shows up in the next morning's email. Catching it one day later rather than one week later gives time to react.
One query, many readers
The same result can go to executives, team leads and an analyst without anyone exporting a file. Everyone sees identical numbers, which ends disputes about whose spreadsheet is right. A single source of truth in the email replaces several competing exports.
A running archive in email
Each morning's message is a dated snapshot. Looking back at last quarter's launch week is a mailbox search rather than a data pull from BigQuery. Nobody has to remember to save the numbers before they change, because the message does that automatically each day.
Dashboard logins no longer required
People without BI licenses or console access still see the figures. Access to the data stays tight while the answers travel widely. A finance contractor or board adviser can follow the business closely without ever touching the warehouse itself, and that keeps permissions simple.
How it works
What happens, step by step
Every morning, ClickRuntime runs your saved BigQuery query.
It lays the results out as a neat table with a column per figure.
The table arrives in your inbox with the subject "Daily KPIs".
Before it runs live
- Connect BigQuery
What you get
Build your own
Need it to work differently?
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 BigQuery steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, notify
PROJECT = "my-project"
SQL = """
SELECT DATE(created_at) AS day, COUNT(*) AS orders, ROUND(SUM(total), 2) AS revenue
FROM sales.orders WHERE created_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY day ORDER BY day
"""
@on_trigger
def run(event):
res = http.post(f"https://bigquery.googleapis.com/bigquery/v2/projects/{PROJECT}/queries",
headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"},
json={"query": SQL, "useLegacySql": False}).json()
cols = [f["name"] for f in res["schema"]["fields"]]
rows = [[c["v"] for c in r["f"]] for r in res.get("rows", [])]
table = "\n".join(" ".join(f"{v:>12}" for v in row) for row in [cols] + rows)
notify.email_me("Daily KPIs", table)
return {"rows": len(rows)}FAQ
Common questions
Can the email include more than one KPI?
What time zone does the daily schedule use?
Does the email show trends or just today's value?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Save API snapshots to a BigQuery table
Data from an API is appended to your table with a timestamp on each run, building a history you can query.
See how it worksGet alerted when a metric crosses a limit
A query runs every hour and you hear in Slack as soon as the value passes your threshold.
See how it worksHear when a table stops updating
Each morning you're told if a table hasn't changed in the last day, so broken pipelines get noticed.
See how it worksKeep exploring
Set up “Get your KPI query results every morning” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.