Skip to content

On a schedule

Post yesterday's store sales to Slack every morning

Each morning your team sees yesterday's orders, revenue and best sellers in Slack, with a warning when revenue is far above or below normal.

Runs
On a schedule
Apps
Slack, WooCommerce
AI
Not needed
Access
Woo read key; chat:write

Send this to your assistant

Create a ClickRuntime automation: every morning at 8, post yesterday's WooCommerce order count, revenue and top 3 products to #sales, and warn me if revenue is 50% above or below the 7-day average.

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 small online shop owner checks the WooCommerce dashboard most mornings, but the rest of the team never does. A broken checkout or a payment gateway outage can cost a full day of sales before anyone notices the numbers are down, and a sudden spike from a mention goes uncelebrated and unstocked.

A daily snapshot in Slack makes yesterday's trading a shared fact. Comparing against the recent average turns a number into a signal: a big drop is a reason to check checkout, a big jump a reason to check stock.

What you get out of it

  • Problems surface the next morning

    A sharp fall in revenue usually means something broke. Seeing it at 8am, not at the end of the week, limits the damage to a single day.

  • Everyone sees the same numbers

    Marketing, fulfilment and the owner read one message instead of each pulling their own report, so conversations start from the same figures.

  • Spikes get acted on

    When a product suddenly sells, the team knows to check stock and lean into whatever caused it while it's still working.

  • No admin logins needed

    Staff who shouldn't have WooCommerce admin access can still follow how the shop is doing.

How it works

What happens, step by step

  1. Every morning at 8, ClickRuntime fetches yesterday's paid orders from your WooCommerce store.

  2. It adds up the order count and revenue and finds the three best-selling products.

  3. It compares revenue with the average of the previous seven days, which it keeps from earlier runs.

  4. It posts the summary to #sales in Slack, with a warning when revenue is 50% above or below that average.

Before it runs live

  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Connect WooCommerce

What you get

RunsOn a schedule
Post yesterday's store sales to Slack every morningtoday, 9:00Succeeded
Slack · #salesYesterday: 42 orders, $3,184.50. Top: Northwind Mug (18), Acme Tote (9), Trail Socks (7)

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 Google Sheets
  • Combine it with other Slack and WooCommerce 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_sales_snapshot_and_revenue_spike_alerts.pyexample
from datetime import date, timedelta
from collections import Counter
from clickruntime import on_trigger, credentials, http, state, notify

STORE = "https://shop.example.com/wp-json/wc/v3"

@on_trigger
def run(event):
    auth = (credentials.secret("WOO_KEY"), credentials.secret("WOO_SECRET"))
    day = date.today() - timedelta(days=1)
    orders = http.get(f"{STORE}/orders", auth=auth, params={"after": f"{day}T00:00:00", "before": f"{day}T23:59:59",
                      "status": "processing,completed", "per_page": 100}).json()
    revenue = sum(float(o["total"]) for o in orders)
    top = Counter()
    for o in orders:
        for item in o["line_items"]:
            top[item["name"]] += item["quantity"]
    history = state.get("history") or []
    avg = sum(history) / len(history) if history else None
    text = f"Yesterday: {len(orders)} orders, ${revenue:,.2f}. Top: " + ", ".join(f"{n} ({q})" for n, q in top.most_common(3))
    if avg and abs(revenue - avg) > 0.5 * avg:
        text += f"\n:warning: Revenue is {revenue / avg - 1:+.0%} vs the 7-day average (${avg:,.2f})"
    notify.slack(text, channel="#sales")
    state.set("history", (history + [revenue])[-7:])
    return {"orders": len(orders), "revenue": revenue}

FAQ

Common questions

Which orders count towards revenue?
Orders with a status of processing or completed. Pending, cancelled, failed and refunded orders are left out, so the figure matches money you actually took.
What is the spike warning compared against?
The average daily revenue of the previous seven days, which the automation remembers between runs. The first week builds up that history before warnings start.
Can I use a different threshold than 50%?
Yes. Ask for a tighter or looser band, such as 30%, depending on how much your daily sales usually vary.
What permissions does it need?
Woo read key; chat:write. 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 “Post yesterday's store sales to Slack every morning” from your assistant

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