On a schedule
Log daily WooCommerce sales in a sheet
Each night the day's orders and revenue are added to a sheet and posted to Slack.
- Runs
- On a schedule
- Apps
- Google Sheets, WooCommerce
- AI
- Not needed
- Access
- WooCommerce read; Sheets write
Send this to your assistant
Create a ClickRuntime automation: every day at 11pm, total today's WooCommerce orders and revenue, add a row to my Daily Sales sheet, and post the numbers to #sales.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Shop owners want to know how today went without logging into the WooCommerce dashboard, and they want a history they can chart against ad spend or seasons. WooCommerce reports are fine for a quick look but awkward for building your own analysis.
Logging each day's totals to a sheet builds that history automatically, and the Slack post keeps the team aware of how the shop is doing.
What you get out of it
A sales history you own
Every day is a row in your sheet, ready for charts, comparisons and forecasts.
The team sees the numbers
A nightly Slack post keeps everyone aware of how sales are going, without dashboard access.
Compare with anything
Put ad spend, weather or promotions next to the sales column and spot what moves the numbers.
Same numbers every night
Totals are calculated the same way each day, so the record is consistent.
How it works
What happens, step by step
Every night ClickRuntime fetches the day's paid orders from your store.
It adds up the number of orders, revenue and average order value.
A row with the date and totals is added to your sheet.
The same numbers are posted to your Slack channel.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect WooCommerce
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 and WooCommerce 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 datetime import datetime
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials, http, notify
SHEET_ID, TZ = "your-spreadsheet-id", ZoneInfo("Europe/London")
STORE = "https://yourstore.com/wp-json/wc/v3"
def wc(method, path, **kw):
resp = http.request(method, STORE + path, auth=(credentials.secret("WC_CONSUMER_KEY"), credentials.secret("WC_CONSUMER_SECRET")), **kw)
resp.raise_for_status()
return resp.json()
def sheets():
return build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets().values()
@on_trigger
def run(event):
today = datetime.now(TZ).date()
start = datetime.combine(today, datetime.min.time(), TZ).isoformat()
orders = wc("GET", "/orders", params={"after": start, "status": "processing,completed", "per_page": 100})
revenue = sum(float(o["total"]) for o in orders)
avg = revenue / len(orders) if orders else 0
sheets().append(spreadsheetId=SHEET_ID, range="Daily!A:D", valueInputOption="RAW",
body={"values": [[today.isoformat(), len(orders), round(revenue, 2), round(avg, 2)]]}).execute()
notify.slack(f"🛒 {today:%a %d %b}: {len(orders)} orders, £{revenue:,.2f} revenue (avg £{avg:,.2f})", channel="#sales")
return {"orders": len(orders), "revenue": round(revenue, 2)}FAQ
Common questions
Which orders are counted?
Does it include refunds?
Which time zone does the day use?
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
Clean up product images from a sheet queue
Products you list in a sheet get new clean-background images made and attached in WooCommerce.
See how it worksWrite SEO titles and descriptions for your products
Products you list in a sheet get AI-written SEO titles and meta descriptions in WooCommerce, with progress tracked in the sheet.
See how it worksAdd products to WooCommerce from a sheet
New rows in your product sheet become WooCommerce products with AI-written descriptions, and stock changes in the sheet are kept in sync.
See how it worksKeep exploring
Set up “Log daily WooCommerce sales in a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.