Skip to content

Every 2 hours

Get alerted when ad spend or CPA runs high

If today's spend or cost per purchase passes your limit, Slack hears about it once, not every two hours.

Runs
Every 2 hours
Apps
Meta Ads
AI
Not needed
Access
ads_read

Send this to your assistant

Create a ClickRuntime automation: every 2 hours, check today's Meta Ads spend and cost per purchase. If spend goes over $400 or cost per purchase over $35, alert #marketing in Slack once per day.

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

Meta ad accounts can burn through a budget faster than anyone expects. A duplicated ad set, a broad audience that suddenly gets expensive or a campaign set to the wrong budget can spend a month's allowance in one weekend. Many advertisers find out when the card statement arrives or the payment limit is hit, long after the damage is done and long after the account could have been paused.

Every two hours, ClickRuntime reads today's insights from Meta, compares total spend and cost per result with the limits you set, and sends an alert when either goes over. It alerts once per day for each breach, so you are told without being pinged all day.

It is useful for owners who run ads themselves, agencies guarding client budgets and finance teams who care about spend caps.

What you get out of it

  • Runaway spend is stopped within hours

    A two-hour check means a misconfigured campaign cannot drain a week's budget overnight. You pause it the same morning and the cost is limited to what you can afford. That is a much smaller loss.

  • Cost per result is kept under control

    A CPA limit protects margins. If acquiring a customer starts to cost more than they are worth, you know the same day and can change targeting or creative instead of waiting for a monthly review.

  • Clients are not surprised by overspend

    Agencies who tell a client about a problem before they notice keep trust. An alert gives you the facts and time to explain what happened and what you are doing about it.

  • Weekend and holiday coverage

    Problems do not wait for working days. A check that runs through the weekend catches overspend on Saturday afternoon, when nobody is looking at Ads Manager. Nobody has to remember to log in during their time off.

  • One alert per breach keeps it readable

    Warning once per day for each limit avoids a flood of messages while a campaign stays over. The team keeps paying attention because the alert is rare and meaningful. That keeps the team willing to read each alert quickly.

  • Budget discipline backed by data

    Setting explicit spend and CPA limits forces a conversation about what is acceptable. The alerts then enforce that agreement without anyone needing to remember it. Everyone knows exactly what the numbers are supposed to be.

How it works

What happens, step by step

  1. Every 2 hours, ClickRuntime checks today's Meta Ads spend and cost per purchase.

  2. It compares them with the limits you set.

  3. If either goes over, a message goes to your Slack channel with today's figure and your limit.

  4. You get at most one alert per limit per day, so the channel doesn't fill up.

Before it runs live

  • Connect Meta Ads

What you get

RunsEvery 2 hours
Get alerted when ad spend or CPA runs hightoday, 9:00Succeeded
Slack · #marketingMeta Ads: Spend today is $412.80 (limit $400)

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 Meta Ads 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_spend_cpa_threshold_alert.pyexample
from datetime import date
from clickruntime import on_trigger, state, notify, http, credentials

ACCOUNT = "act_123456789"
MAX_SPEND, MAX_CPA = 400, 35

@on_trigger
def run(event):
    token = credentials.connection("meta-ads", "main")
    rows = http.get(f"https://graph.facebook.com/v21.0/{ACCOUNT}/insights", params={
        "date_preset": "today", "fields": "spend,cost_per_action_type", "access_token": token,
    }).json()["data"]
    if not rows:
        return {"spend": 0}
    spend = float(rows[0]["spend"])
    cpa = float(next((a["value"] for a in rows[0].get("cost_per_action_type", []) if a["action_type"] == "purchase"), 0))
    alerted = state.get("alerted") or {}
    today = date.today().isoformat()
    for name, value, limit in [("Spend", spend, MAX_SPEND), ("Cost per purchase", cpa, MAX_CPA)]:
        if value > limit and alerted.get(name) != today:
            notify.slack(f"Meta Ads: {name} today is ${value:,.2f} (limit ${limit})", channel="#marketing")
            alerted[name] = today
    state.set("alerted", alerted)
    return {"spend": spend, "cpa": cpa}

FAQ

Common questions

Does it use account-level or campaign-level numbers?
The default check looks at the whole ad account for the current day. It can also be set to look at individual campaigns, which is helpful when each campaign has its own budget or target cost per result.
What counts as a result for the cost per result limit?
It uses the result type Meta reports for each campaign's objective, such as purchases, leads or link clicks. Because objectives differ, check that the limit fits the kind of result each campaign is optimized for.
Can it stop my campaigns automatically?
It only alerts. Pausing campaigns automatically would be a bigger decision with its own risks, so you decide what to do after the alert. Any change to its behavior would be shown for your approval first.
What permissions does it need?
ads_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 (every 2 hours). 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 alerted when ad spend or CPA runs high” from your assistant

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