Skip to content

Daily

Get yesterday's totals every morning

Each morning you get yesterday's totals from your sheet, compared with the day before.

Runs
Daily
Apps
Google Sheets
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: each morning at 7am, total yesterday's rows in my Sales sheet by product and email me the totals compared 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 shop owner exports orders into a Google Sheet. Every morning she filters by yesterday's date, sums revenue, counts orders, calculates average order value and compares them to the day before, using the same five clicks and a calculator. It takes ten minutes, and on weekends or busy mornings she skips it, so when sales dip she cannot say whether it began on Tuesday or the week before.

Each morning, ClickRuntime reads the sheet, filters the rows for yesterday, adds up the totals you care about and compares them with the day before using the totals it saved in its state. It sends you a short email with yesterday's numbers and the change.

Shop owners, marketers, clinic managers and anyone who tracks a daily number in a sheet use it to see how things are going.

What you get out of it

  • Yesterday's numbers waiting at breakfast

    The email is there before you are, with revenue, orders and change already worked out. Ten minutes of filtering and adding becomes a thirty-second read. That saves roughly an hour every week.

  • Dips are noticed the next morning

    Comparing with the previous day makes a sudden fall visible immediately. You can check for a broken checkout or a paused ad that day, not at month end. Small problems are cheaper to fix than slow ones.

  • The same figures calculated the same way

    Computed by rule each day, the numbers are not affected by a slip of a filter or a wrong range. Comparisons across weeks are reliable because the method never changes.

  • A habit that does not depend on you

    Reading the sheet by hand fails on weekends, holidays and busy days. A scheduled email arrives anyway, which gives you an unbroken run of daily figures to look back through.

  • A running history in your inbox

    Every email is a dated snapshot, so you can search for a past day to see what the numbers were. That is useful when you try to recall when a promotion started to pay off.

How it works

What happens, step by step

  1. Every morning ClickRuntime reads the sales rows in your Google Sheet.

  2. It adds up yesterday's totals for each product or category.

  3. It compares each total with the day before.

  4. You get an email with yesterday's total in the subject and the change for each line.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use

What you get

RunsDaily
Get yesterday's totals every morningtoday, 9:00Succeeded
Email · Sales 2026-10-18: 4,310.00Pro plan: 2,900.00 (+400.00 vs day before) Add-ons: 1,410.00 (-120.00 vs 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 Google Sheets 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.
daily_kpi_email_from_a_sheet.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from collections import defaultdict
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, notify

SHEET_ID = "your-spreadsheet-id"

@on_trigger
def run(event):
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
    rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Sales!A2:C").execute().get("values", [])
    y, d2 = (date.today() - timedelta(days=1)).isoformat(), (date.today() - timedelta(days=2)).isoformat()
    totals = {y: defaultdict(float), d2: defaultdict(float)}
    for day, product, amount in (r for r in rows if len(r) > 2):
        if day in totals:
            totals[day][product] += float(amount)
    lines = [f"{p}: {v:,.2f} ({v - totals[d2].get(p, 0):+,.2f} vs day before)" for p, v in sorted(totals[y].items())]
    total = sum(totals[y].values())
    notify.email_me(f"Sales {y}: {total:,.2f}", "\n".join(lines) or "No sales yesterday.")
    return {"total": total}

FAQ

Common questions

Which numbers can it calculate?
Totals, counts, averages, minimums and maximums over any columns, such as revenue, orders, refunds or average basket. Say which columns hold the values and which holds the date, and the calculation is set up to match.
How does it compare with the day before?
It saves each day's totals as state between runs and compares the latest totals with the stored ones. The first run has nothing to compare with, so the comparison starts from the second day onward.
What if the sheet has no rows for yesterday?
The email reports zero for that day and notes that there were no entries, so you can tell the difference between a quiet day and a broken data feed. For shops that close on certain days, that can be skipped.
What permissions does it need?
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 (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 “Get yesterday's totals every morning” from your assistant

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