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.
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
Every morning ClickRuntime reads the sales rows in your Google Sheet.
It adds up yesterday's totals for each product or category.
It compares each total with the day before.
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
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 Google Sheets steps into one automation
Under the hood
The code that runs this automation
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?
How does it compare with the day before?
What if the sheet has no rows for yesterday?
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
Keep your sheet free of duplicates and bad data
Duplicate rows are removed, names and phone numbers are tidied, and invalid emails are flagged.
See how it worksMonitor your sites and SSL certificates
You're warned when a site in your list is down or its certificate expires within 14 days.
See how it worksGet alerts for upcoming dates in a sheet
You're emailed when a date in your sheet is coming up or a value crosses a limit.
See how it worksKeep exploring
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.