OROVA.VN — BIZ AI AGENT
Playbook

Writing ad automation rules as sentences, not scripts

Orova 39 views
Writing ad automation rules as sentences, not scripts

An ad automation rule is one sentence with five things in it: a condition, the metric it reads, how many days it reads, the action it is allowed to take, and the limit on that action. Write all five and the rule does what you meant. Leave one out and it either sits silent forever or takes a campaign somewhere you did not intend.

This article is about writing that sentence well. Not code, not dragging boxes around a canvas. The same words you would use to brief a capable new colleague, with the numbers filled in where the words are vague.

By the end you will have a method for picking the metric, choosing the threshold from your own account rather than from a blog post, setting the window, and testing the whole thing before you let it touch anything.

Three ways to express an automation rule

Comparison of three formats for writing an automation rule — a form, a drag-and-drop canvas, and a plain sentence — with where each one breaks and a three-row table on readability, exceptions and version comparison

A form. The tool offers a list of conditions, you pick one and type a number. Fast, clear, hard to break. The limit is that you can only say what the person who built the form anticipated. The eleventh situation on your account has no field, and there is no workaround.

A canvas. Boxes and arrows. It looks good in a demo and it survives about three levels of nesting. Add one exception for the promotion week in December and the diagram becomes something the person who drew it last month has to re-derive from scratch.

A sentence. "If cost per lead over the last 7 days runs 30% above target while lead volume is flat, cut daily budget by 20%." Anyone in your team can read that and predict what will happen. Nobody can read a forty-node diagram and do the same.

The reason this matters is not elegance. The largest cost in any automation is not building it — it is changing it eight months later, when the person who wrote it has moved on and the account has changed shape. A sentence survives that. A diagram usually does not, and a form never had the expressiveness to begin with.

Use whichever your tool gives you. Google's built-in rule builder is a form and it is a perfectly good place to start. But whatever the interface, write the sentence first, on paper, and only then translate it into whatever fields the tool offers. Rules written directly into a form tend to be missing a clause, because the form did not ask for it.

One sentence, taken apart

One automation sentence split into five labelled clauses — condition, metric, window, action and limit — each with a note on what goes wrong when that clause is missing

The condition. When this applies. Write it with two halves, not one. "Cost per lead 30% above target" on its own fires on a campaign that is scaling successfully: cost per lead went up, but total leads went up faster, so you are making more money than last week. That rule throttles the campaign that is winning. Add "while lead volume is flat" and it only fires when you are genuinely paying more for the same result.

The metric. Which number the rule is allowed to judge on. This deserves more thought than it usually gets and has its own section below.

The window. How many days of history it reads. This one setting changes the answer more than the threshold does, and it also has its own section.

The action. What it may do. "Cut daily budget." Not "review", not "consider", not "look into". If you cannot picture the exact field that changes and the direction it moves in, the sentence is not finished.

The limit. How far, and how often. "By 20%, at most once every three days." This is the clause people leave out and the only one that caps what a badly written condition costs you.

A useful test on any finished sentence: hand it to somebody who does not know the account and ask what they would do. If two people would do different things, the sentence is missing a number.

Which metrics are stable enough to trigger on

Three families of ad metrics — volume, efficiency and health — showing which family to judge on and which to use as a control

Metrics fall into three groups, and each does a different job in a rule.

Volume metrics — spend, impressions, reach, clicks. These describe the scale you are running at. On their own they say nothing about quality. High spend is not a problem, it is a fact.

Efficiency metrics — cost per click, cost per result, click-through rate, return on ad spend. This is the family you judge on. One caveat that catches people out: cost per result only means anything once the campaign actually produces enough of that result to average. A campaign with two conversions has a cost per result, and it is noise.

Health metrics — frequency, audience saturation, audience overlap, days since the creative last changed. These warn about a problem arriving rather than one already here. Rising frequency on Meta is usually the earliest reliable signal that performance is about to slide.

The working rule: one efficiency metric to judge on, one volume metric as a control. Efficiency alone squeezes campaigns that are scaling. Volume alone cannot tell you whether the money was worth spending.

Two traps worth naming. Return on ad spend used as the only metric cannot tell ten small orders apart from one large one, and for many businesses those two outcomes have completely different futures. And click-through rate as a trigger for pausing is almost always wrong — it measures whether the ad got attention, not whether the attention was worth paying for.

How much data makes a metric stable

Before you trigger on a metric, check that the campaign produces enough of it. A rough working threshold: at least 30 conversions across the window you are reading. Below that, the number swings enough on ordinary variance to fire a rule for no reason.

If your campaigns do not reach 30 conversions a week, you have three options: widen the window to fourteen days, trigger on a metric further up the funnel where volume is higher, such as cost per click or click-through rate, or accept that the rule can only be a defensive one where the threshold is far from normal behaviour.

The window nobody thinks about

The same automation rule evaluated on 3-day, 7-day and 30-day lookback windows for one campaign, producing three different verdicts: fires, stays silent, sees nothing wrong

Same rule, same campaign, three different windows, three different answers. Nothing in the sentence changed. Only the number of days it was allowed to read.

On three days the campaign shows 244,000 VND per lead against a 180,000 target — 36% above, so the rule fires and cuts budget. On seven days it shows 201,000 — 12% above, under the trigger, nothing happens. On thirty days it shows 173,000, slightly better than target, and the rule sees a healthy campaign.

Short windows react fast and swallow noise. A public holiday, a competitor's promotion, half a day of site downtime — each of those distorts a three-day figure enough to trigger a rule.

Long windows are stable and slow. A campaign that started failing last Tuesday still looks fine across thirty days, because twenty-three good days are holding the average up. By the time a thirty-day figure moves, the problem is a month old.

Seven days is the sane default because it covers a full weekly cycle: weekday and weekend behaviour both appear, and the day-of-week effect that distorts every shorter window cancels out. Low-volume accounts should use fourteen, for the reason in the previous section.

One technique worth knowing: write conditions that compare two windows against each other rather than against a fixed number. "If cost per result over 7 days is more than 25% higher than cost per result over 28 days" catches a deteriorating trend without you having to know the right absolute level. That form is particularly useful on accounts with strong seasonality, where any fixed threshold is wrong for half the year.

Choosing the threshold from your own account

Most bad rules are bad because the number came from somewhere other than the account.

The common failure is setting the target to what you want rather than what the account currently produces. If your real cost per lead has averaged 180,000 for six months and you set the trigger at 120,000, the rule fires every single day, and within a week you stop reading it. A rule you have learned to ignore is worse than no rule, because it occupies the place where a useful one would go.

The method takes about twenty minutes:

One. Pull the last 90 days at campaign level, one row per campaign per week. Not the account average — campaign level, because account averages hide everything.

Two. Find the median for the metric you plan to trigger on. Median, not mean: one disastrous week will drag a mean far enough to make it useless.

Three. Set the trigger 25% to 40% above that median. If the median cost per lead is 180,000, trigger at 225,000 to 250,000. That range is wide enough that ordinary variance does not reach it, and tight enough that a genuine problem crosses it within a week.

Four. Count how many times in those 90 days the threshold would have been crossed. If the answer is more than a dozen, the threshold is too tight. If the answer is zero, it is too loose to ever do anything.

For defensive rules — the ones that pause a campaign spending with nothing to show — the arithmetic is different. Set the spend threshold at roughly three times your target cost per result. If a lead costs 180,000 on average, a campaign that has spent 540,000 with zero leads has had a fair chance. Below that multiple you will pause campaigns that were about to work.

Write down why you chose each number, in one line, next to the rule. "Trigger at 250,000 because the 90-day median is 180,000 and 40% above it was crossed four times last quarter." Six months later that line tells you whether to change it. The number on its own tells you nothing.

Four schedules, and when each is right

Four schedule options for running an automation rule — manual run, after each data refresh, once daily in the morning, and weekly on a set day — with the account type each suits

Only when you click run. Use this while drafting. You run it, read the output, notice the sentence was ambiguous, fix it, run again. That loop is the fastest way to find out whether your rule says what you think it says.

After each data refresh. Evaluates whenever fresh numbers land. Suits accounts that move fast enough to need same-day reaction.

Once a day, early morning. Where most accounts should stop. Running at 8am means the rule is reading a complete previous day. Running at 2pm means it is reading a half-finished today, which always looks worse than the day turns out to be, and produces cuts that would not have happened at 6pm.

Weekly on a set day. For stable accounts and for rules that are really periodic reviews rather than live reactions.

Do not set fifteen-minute intervals because the scheduler allows it. Ad data does not move that fast, every run is another chance for a wrong rule to act, and on any tool that charges by the run or by the model call, frequency is the single fastest way to burn through what you are paying for. Running more often does not optimise harder.

Writing your first rule, step by step

Stop thinking of it as instructions for software. Write it as a brief for someone competent who has never seen this account.

Step one. Describe the situation you handled most often last month, in your own words. "A campaign has been live about a week, cost per lead keeps creeping up, and the number of leads is not going anywhere."

Step two. Put a number wherever the words are vague. Creeping up by what percentage against what target? A week means seven days. Not going anywhere means within what margin, plus or minus 10%?

Step three. State the response and its size. Reduce the daily budget — by how much, and at most how often?

Step four. Add the exclusions. Campaigns live under seven days are excluded. Brand campaigns are excluded. No more than three campaigns changed in one run.

Step five. Read it back and ask whether somebody who does not know this account would do exactly what you meant. Wherever they could reasonably read it differently, add a number.

A complete rule set, written out

Here is what the finished thing looks like for a retail account. The figures are illustrative — substitute your own from the previous section.

Objective. Keep cost per purchase under 200,000 VND on the dining-table range without throttling anything that is scaling profitably.

Window. 7 days.

Rule 1, defensive. "If a campaign spends more than 600,000 across two consecutive days with zero purchases, pause it. At most two campaigns per run." Runs in execute mode, because a wrong pause costs a few hours of delivery and is undone in one click.

Rule 2, hold efficiency. "If cost per purchase over 7 days is more than 30% above 200,000, and purchases over 7 days are not higher than the previous 7 days, recommend a 20% budget reduction. Does not apply to campaigns live under 7 days." Stays in advise mode, because a wrong reduction costs opportunity you never find out about.

Rule 3, expansion. "If a campaign is limited by budget and cost per purchase is still under 200,000, raise the daily budget by at most 15% per change, no more than once every 3 days, never above 3,000,000 per day." Executes, with three separate limits.

Schedule. Daily at 8am.

Applies to. The four campaigns with "Dining" in the name.

Notice the pattern in the permissions. The defensive rule executes because being wrong is cheap. The rule that reduces spend only advises, because being wrong is invisible. The rule that increases spend executes but carries a per-change cap, a cooldown and an absolute ceiling. That ordering is worth copying even if none of the numbers apply to you.

Google, Meta and TikTok differ in what you should trigger on

A common question: can one rule set serve all three platforms? Technically yes. In practice it is a bad idea, because the platforms differ in which signals can be trusted.

Google Search has something the other two do not: the person typed their intent. Rules for Google can lean on keywords and search terms, which are unusually concrete. Google also reports impression share lost to budget separately from impression share lost to rank, and a rule written for Google should use that split rather than treating missed impressions as one thing. Money only fixes the budget half; applied to a rank problem the spend goes up while relevance, bid competitiveness and landing experience stay exactly where they were.

Meta has no typed intent but much clearer creative fatigue signals. Frequency and creative age matter more here than anywhere else. Any Meta rule set should carry at least one frequency condition.

TikTok runs faster than both. An ad with a useful life of a few days is normal there, not a fault. Port Meta thresholds straight across and the rules will alarm constantly about behaviour that is ordinary on the platform.

What none of the three will let a rule change: the ad copy or creative, and the targeting itself. All three allow a rule to pause and resume, change a budget, and change a bid or target. Anything beyond that is a manual edit, and that boundary is the same whether you use the platform's own rule builder or an external tool.

The recommendation: one rule set per platform, named consistently for the same objective, with separate thresholds. Editing is safer that way too — changing a TikTok number cannot disturb Google.

Moving over from the platform's native automated rules

Most accounts that take this seriously already have something running: Google's automated rules, Meta's rules, or a spreadsheet with conditional formatting that somebody checks on Mondays. Be precise about what transfers.

What transfers directly. Anything of the form "if metric crosses threshold, do action" maps across without changing the numbers. If you have a Google rule pausing keywords above a cost-per-conversion threshold, that becomes a sentence with the same threshold. Port these first — you already know the numbers work, which removes the hardest guesswork from your first week.

What gets better. Native rule builders evaluate one condition set in isolation. A written sentence can express relationships: this threshold, but only when volume is flat, and not while the campaign is in learning, and no more than once every three days. Those qualifiers are where most of the value sits and they are exactly what a simple form cannot say.

What does not transfer. Anything that depends on data the platform does not hold. If your spreadsheet has a margin column pulled from your accounting system, no platform rule can use it, and neither can an external tool unless you get that data to it. Check this early — it is usually the reason the spreadsheet existed.

What to do with the old rules. Turn them off rather than leaving both running. Two systems acting on the same campaign is the fastest route to behaviour nobody can explain, such as a budget rising and falling on alternating days because two automations disagree. If you want to keep a native rule as a safety net, keep the one furthest from your normal operating range so it only fires in a genuine emergency.

How this sits alongside Smart Bidding

If you are running Target CPA or Target ROAS, the platform is already automating. Rules operate at a different level, and confusing the two levels causes real damage.

Smart Bidding decides per auction. It sets a bid for a specific query from a specific person at a specific moment, using signals no external system can see. Nothing you write competes with that and you should not try.

Your rules decide about the campaign. Whether the target is right, whether this campaign deserves more budget than that one, whether it should be running at all. Smart Bidding does not ask those questions — it optimises toward the target you gave it without judging whether the target still makes sense.

The practical consequence is a rule about restraint: do not write rules that change bid targets often. Every target change unsettles learning to some degree, and a rule nudging Target CPA every week keeps a campaign permanently in flux. Change targets when your economics change, not when last week's numbers wobbled.

Where rules add most on a Smart Bidding account is around the edges: catching campaigns limited by budget so the bidding has room to work, pausing what is spending without converting, and flagging when actual performance has drifted so far from the target that the target itself needs revisiting. That last one is the alert people forget to build, because the instinct is to keep the target and blame the algorithm.

When two of your own rules disagree

Write four rules and eventually two of them will speak about the same campaign and say opposite things. One wants to raise the budget because the campaign is limited by budget. The other wants to cut because cost per result is over target. Both conditions can be true at once.

That is not a fault in the software. It means a priority decision has not been made yet. Three ways to make it:

Add an exclusion to one of them. The raising rule gains "and cost per result is still under target". Now they cannot both match. Cleanest option, and the one to reach for first.

Separate the scopes. Assign the raising rule to campaigns you are deliberately scaling and the cutting rule to campaigns you are holding at a cost target. Same account, no overlap.

Leave one on advise. If both genuinely need to exist across the same campaigns, let the riskier one only recommend, and you become the tie-breaker.

What not to do: nudge the thresholds back and forth until the collision stops happening. That leaves both rules drifted away from their original intent, and six months later nobody can explain why the number is 27%.

A general ordering that holds on most accounts: defensive rules outrank efficiency rules, and efficiency rules outrank growth rules. Write that priority down somewhere, because you will need it again.

Testing a rule before you trust it

Never switch a new rule straight to execute. Four checks first.

Run it manually and read the reasoning, not the conclusion. If the output says "reduce budget on campaign X" and the explanation does not reference the condition you actually wrote, your sentence was ambiguous and something is filling the gap with inference.

Test an impossible threshold. Temporarily set something absurd in the opposite direction — cost per result 500% above target. Run it. The result must be nothing at all. If something still fires, the rule is matching for a reason other than the one you think, and you have just avoided an expensive week.

Check it against a decision you already made. Recall a time you cut a budget by hand. Would this rule have caught that situation? Would it have caught it on the same day, or four days later? Your own history is the best test set you will ever have.

Run it in advise for two weeks and count. How many times did it fire? How many of those would you have accepted? A rule you would have accepted every time is ready for execute. A rule you overrode twice needs another clause, not a slightly different number.

Reading the output once it is running

Most of your involvement after this is reading what the rule produced, and the useful stance is editorial.

Check the reasoning quotes your numbers back. Good output reads: "cost per result over 7 days was 34% above the 200,000 target while purchases fell 3%". If the reasoning is generic where your sentence was specific, the sentence was looser than you thought.

Check the near misses. Situations that matched partly and failed one condition are more informative than the actions taken, because they show where your threshold sits relative to reality. A rule that never has a near miss is set so far from normal behaviour that it is doing nothing.

Check the silence. On a stable account, most days should produce nothing. If output arrives every day, either the account is genuinely volatile or the thresholds are too tight. Both are worth knowing and they lead to different fixes.

Keep the ones you disagreed with. Note why you overrode a recommendation. After a month the pattern is usually obvious, and consistent overrides in one direction almost always mean a threshold needs moving.

Six mistakes people make in the first month

One: a condition with no counterweight

"If cost per purchase rises, reduce budget." Sounds reasonable, and it throttles the campaign that is scaling. Always add a second clause: "while conversion volume is flat", or "while total revenue does not rise proportionally".

Two: a threshold set from hope

The target set to the number you want rather than the number the account produces. The rule fires daily, and within a week nobody reads it. Pull 90 days, take the median, set the trigger 25% to 40% above it.

Three: an action nobody can carry out

A well-reasoned paragraph ending in "review the audience". Nothing can execute that. Every rule has to end in a specific field changing to a specific value, or in a pause, or in an item being added to an exclusion list.

Four: one rule set that does everything

Three thousand words covering budget, audience, bidding and frequency together. When it produces a strange decision you cannot tell which part caused it. Split by purpose: one set for budget, one for clearing weak creative. Easier to read, easier to edit, and each can be switched off on its own.

Five: no stopping condition

A rule raises budget when performance is good and says nothing about limits. Performance is good, so it raises. Still good tomorrow, so it raises again. Two weeks later the daily budget is four times what it was and the campaign left its efficient range days ago. Always a ceiling and a cooldown: "at most 20% per change, no more than once every three days, never above X per day".

Six: writing rules for rare events

This one afflicts careful people. After the main rule is written they start adding exceptions — public holidays, site outages, a competitor bidding hard that week. The rule set triples in length, covers everything, and becomes unreadable.

Rare situations should be handled by hand. A holiday week is a reason to switch execute mode off for seven days, not a clause. A working limit: only write rules for situations that happen at least monthly. Rarer than that and the cost of writing and maintaining the clause exceeds what it saves, and every extra clause is another thing to misread at speed.

Frequently asked questions

Do I need to know how to code?

No. Google's own rule builder is a form, Meta's is a form, and tools that take sentences take ordinary sentences. What you need is not syntax. It is knowing your target cost per result, your ceiling, and how many days of data make a trend on your account.

What happens if I write it badly?

In advise mode, nothing — you get a recommendation you disagree with and you ignore it. That is exactly why every new rule should run in advise for a few weeks before anything gets execute rights.

Can one rule cover many campaigns?

Yes, and it usually should. But the threshold is shared, so if the campaigns have genuinely different cost targets, split the rule rather than picking a threshold that suits neither. Split when the economics differ, not when the campaign names differ.

Does editing a rule affect changes it already made?

No. Changes already applied stay applied and stay in the change history. An edit only affects subsequent runs. If you want to undo what it did, you undo it on the platform.

Should I write in English or in my own language?

Whichever you express yourself most precisely in. Precision beats industry vocabulary every time. A rule written clearly in Vietnamese is worth more than the same rule written approximately in English.

How long should the first one take?

Thirty to sixty minutes for a first draft if you already know your target numbers, and an afternoon if you do not — because the real work is deciding the thresholds, not typing them. Teams that have never written their targets down spend hours on the first rule and twenty minutes on every one after it, which tells you where the difficulty actually lives.

Can I see what a rule would have done before switching it on?

Run it manually against current data and read the output. That is effectively a dry run. It will not replay history for you, but running it by hand every morning for a week gives a reliable picture of both how often it fires and whether its reasoning matches yours.

Does the rule need rewriting when the business goal changes?

Yes, and this is the easiest thing to forget. If the quarter shifts from driving sales to collecting leads, the old thresholds are meaningless, because cost per purchase and cost per lead are different scales. Change the goal without changing the rules and the system keeps diligently optimising toward a target nobody wants any more.

How many rules should I have?

Start with three and add one a month. A starter list of nineteen rules grouped by account situation is a reasonable place to pick them from, but switching on more than a handful in the first month means you cannot tell which one caused what.

Where to start today

Open a document and write the situation you handled most often last month, with the actual number you have been applying by instinct. One sentence, five parts. That is the whole first step, and it happens before you open any software.

Then run it by hand for a week, count how often it fires, and adjust the threshold rather than the wording. Wording problems show up as confused output. Threshold problems show up as too many alerts or none at all, and they are much easier to fix.

Resist making the first rule comprehensive. One situation covered correctly beats eight covered approximately, and it is far easier to trust — which is the actual thing you are building here.

Further reading: what artificial intelligence advertising can automate, the limits to set before anything changes a budget, and what an AI ads agent actually is.

Orova Ads optimises campaigns for you

Connect Google, Meta and TikTok in one place. AI reads the numbers, proposes changes and executes under the rules you set.

Explore Orova Ads