create_google_ads_rule
Create a Google Ads automated rule (created switched OFF)
Description
AUTOMATED RULES ON GOOGLE ADS — "pause ad groups whose CPA is over $50 over the last 7 days", "raise the budget 20% when ROAS > 4, never above $300", on a schedule with optional quiet hours. Google's API has NO rules resource (its UI rules are not reachable by any API), so HERMOSO runs these: every run reads the metrics, applies the caps against real numbers, writes through Google's own mutates, reads the result back, and logs it (google_ads_rule_history); a live run can be undone (undo_google_ads_rule_action). EVERY RULE IS CREATED SWITCHED OFF; dry-run it with run_google_ads_rule, then switch it on with set_google_ads_rule_status. OPTIONAL approval step (approval): a scheduled run then PROPOSES its changes and waits for a person (google_ads_rule_approvals, or the one-click link in the brand's alerts); off unless asked for. Conditions take derived metrics or any metrics.<field> Google reports; actions pause / enable / notify / change a budget (campaign) or the manual CPC bid (ad group) by percent, amount or to a value. An increase needs a limit. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
customerId | string | Google Ads customer id from list_google_ads_campaigns; omit when only one is shared with this brand |
loginCustomerId | string | manager (MCC) id, only when the account is reached through a manager; stored on the rule |
namerequired | string | |
scoperequired | object | what the rule looks at |
scope.level | "campaign" | "adGroup" | "ad" | campaign, adGroup or ad. Budgets live on campaigns, the manual CPC bid on ad groups |
scope.ids | string[] | a FIXED list of ids at that level; leave out for every object at the level (re-read every run) |
scope.campaignIds | string[] | only ad groups / ads under these campaigns |
scope.adGroupIds | string[] | only ads under these ad groups |
scope.nameContains | string | only objects whose name contains this |
scope.statuses | string[] | ENABLED and/or PAUSED; default ENABLED (PAUSED for an enable rule) |
conditions | object[] | when it acts. A value that cannot be measured (e.g. cpa with no conversions) never matches |
conditions[].metric | string | cost, impressions, clicks, conversions, conversions_value, ctr, cpc, cpm, cpa (= cost_per_conversion = cost_per_result), roas, conversion_rate, budget, bid — or ANY Google report metric as metrics.<field>, e.g. metrics.search_impression_share. Money is in the account currency |
conditions[].operator | string | >, <, >=, <=, =, !=, between, not_between (Meta's names work too) |
conditions[].value | string | number | string | number[] | a number, or [low, high] for between |
conditions[].window | string | TODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH … or "DAYS:N"; defaults to the rule's window |
match | "all" | "any" | all (default) or any |
window | string | default window for conditions (LAST_7_DAYS) |
unconditional | boolean | true to act on everything in scope every run (no conditions); never inferred |
actionsrequired | object[] | what it does on each match |
actions[].type | "pause" | "enable" | "budget" | "bid" | "notify" | pause, enable, budget, bid or notify |
actions[].change | "increase" | "decrease" | "set" | increase, decrease or set |
actions[].by | object | exactly one, for increase/decrease |
actions[].by.percent | number | |
actions[].by.amount | number | in the account currency |
actions[].to | number | for set: the new value in the account currency |
actions[].limit | number | REQUIRED for an increase: the highest value it may ever reach. A floor for a decrease |
actions[].allowSharedBudget | boolean | allow changing a budget shared by several campaigns |
schedule | object | when Hermoso runs it |
schedule.everyMinutes | number | 15 to 10080; default 60 |
schedule.days | number[] | weekdays 0-6 (0 = Sunday); default every day |
schedule.quietHours | object | a window in which it never acts, e.g. 22:00-07:00 |
schedule.quietHours.start | string | HH:MM |
schedule.quietHours.end | string | HH:MM |
schedule.timezone | string | IANA name; default the ad account's |
caps | object | this rule's own caps |
caps.maxChangesPerDay | number | how often this rule may change the same object in a day, 1-48 (default 1) |
caps.maxRaisePerDay | number | the most this rule may add to budgets in a day, account currency |
approval | object | null | OPTIONAL approval step: a scheduled run proposes instead of acting and the brand's alert channels get a one-click approval link; decide with google_ads_rule_approvals. null removes it. A run by hand is never held. Off unless set |
approval.required | boolean | true (default when approval is given) holds every SCHEDULED change for a person's approval; false removes the step |
approval.timeoutMinutes | number | 15-10080, default 1440 (a day): how long a proposal waits |
approval.onTimeout | "skip" | "apply" | skip (default: nothing changes) or apply (applied as if approved) |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/create_google_ads_rule.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_google_ads_rule","arguments":{"name":"<string>","scope":"<object>","actions":"<array>"}}}
CLI
hermoso call create_google_ads_rule --json '{"name":"<string>","scope":"<object>","actions":"<array>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
google_ads_rule_historyWhat Google Ads automated rules didundo_google_ads_rule_actionUndo a Google Ads rule runrun_google_ads_ruleDry-run (or run now) a Google Ads automated ruleset_google_ads_rule_statusSwitch a Google Ads automated rule on or offgoogle_ads_rule_approvalsApprove or reject what a Google Ads rule proposedset_meta_ad_rule_limitsCaps on what Meta rules may raiselist_google_ads_rulesList Google Ads automated rulesmeta_ad_rule_historyWhat Meta's automated rules didupdate_google_ads_ruleChange a Google Ads automated rulerun_meta_ad_ruleDry-run (or run now) a Meta automated rule