Skip to content

Daily

Catch Shopify pricing and discount mistakes

Each morning you get an email if any price dropped below your floor, changed sharply, or a discount code is larger than your rules allow.

Runs
Daily
Apps
Gmail, Shopify
AI
Not needed
Access
read_products, read_discounts; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every morning, check my Shopify prices and active discounts: email me if any variant is below its compare-at floor, changed by more than 30% since yesterday, or a discount is over 40%.

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 homeware shop runs several sales a year, and staff edit prices and discount codes in a hurry. Once, a code meant for 15% went live at 50% and was shared on a deals site overnight. Another time a price lost a digit and a lamp sold for a tenth of its cost.

A daily check of every price and active discount against a few simple rules catches these slips before they cost real money. It is the second pair of eyes that a busy team rarely has time to be.

What you get out of it

  • Typos are caught within a day

    A price that drops sharply or below your floor is flagged the next morning. You fix it before many orders come in.

  • Discount codes stay within limits

    Codes larger than your maximum, or with no end date, are listed. A code meant for a few people does not quietly run forever.

  • Changes are compared with yesterday

    The check remembers each price, so sudden jumps or drops stand out. Planned changes are easy to recognise and ignore.

  • Quiet when all is well

    You only get an email when something breaks a rule. No daily noise to learn to ignore.

How it works

What happens, step by step

  1. Every morning, ClickRuntime reads the price of every product variant and every active discount in your Shopify store.

  2. It compares each price with yesterday's, which it remembers, and with the minimum you set.

  3. It checks each discount against your maximum percentage.

  4. If anything breaks a rule, you get one email listing the problems.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Shopify

What you get

RunsDaily
Catch Shopify pricing and discount mistakestoday, 9:00Succeeded
Email · 2 Shopify pricing issuesBrass table lamp changed from 189.00 to 18.90 Discount AUTUMN50 is 50%

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 Gmail and Shopify 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.
price_and_discount_checks_with_email_alerts.pyexample
from clickruntime import on_trigger, credentials, http, notify, state

STORE = "your-store.myshopify.com"

def gql(query, variables=None):
    resp = http.post(f"https://{STORE}/admin/api/2025-07/graphql.json", json={"query": query, "variables": variables or {}},
                     headers={"X-Shopify-Access-Token": credentials.connection("shopify", "store")})
    return resp.raise_for_status() or resp.json()["data"]

MIN_PRICE, MAX_CHANGE, MAX_DISCOUNT = 5.0, 0.30, 0.40

@on_trigger
def run(event):
    variants = gql("{ productVariants(first: 250) { nodes { id displayName price } } }")["productVariants"]["nodes"]
    before, problems = state.get("prices") or {}, []
    for v in variants:
        price, old = float(v["price"]), before.get(v["id"])
        if price < MIN_PRICE:
            problems.append(f"{v['displayName']} is {price:.2f}, below the {MIN_PRICE:.2f} floor")
        elif old and abs(price - old) / old > MAX_CHANGE:
            problems.append(f"{v['displayName']} changed from {old:.2f} to {price:.2f}")
    discounts = gql("""{ discountNodes(first: 100, query: "status:active") { nodes { discount { ... on DiscountCodeBasic { title
        customerGets { value { ... on DiscountPercentage { percentage } } } } } } } }""")["discountNodes"]["nodes"]
    for d in discounts:
        pct = ((d["discount"].get("customerGets") or {}).get("value") or {}).get("percentage")
        if pct and pct > MAX_DISCOUNT:
            problems.append(f"Discount {d['discount']['title']} is {pct:.0%}")
    if problems:
        notify.email_me(f"{len(problems)} Shopify pricing issues", "\n".join(problems))
    state.set("prices", {v["id"]: float(v["price"]) for v in variants})
    return {"problems": len(problems)}

FAQ

Common questions

What rules can I set?
A minimum price per product or collection, a maximum change from one day to the next, a maximum discount percentage, and whether codes must have an end date. You can add others, such as prices ending in .99.
Does it change prices back?
No. It only tells you. Changing prices automatically could undo a sale you meant to run, so the fix stays with you.
Does it check automatic discounts as well as codes?
Yes. Both discount codes and automatic discounts that are currently active are checked.
What permissions does it need?
read_products, read_discounts; gmail.send. 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 “Catch Shopify pricing and discount mistakes” from your assistant

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