Manage Automation Rule
adsap_manage_automation_ruleCreate, change, switch on/off or delete an automation rule for one ad account. A rule checks the account every day and, when every condition is true, either just reports it (mode 'notify') or turns the entity off (mode 'auto_act'). ALWAYS call with dry_run true first, read the parsed rule back to the user in plain language including its guardrails, and only call again with dry_run false after they explicitly confirm: a rule mis-parsed from a sentence can switch off a client's live spending. min_spend is REQUIRED and cannot be zero-ed away by design, because a rule with no spend floor fires on noise. Conditions are combined with AND. Cost-per-conversion, return-on-spend and conversion-count conditions automatically ignore the most recent day or two, because conversions take time to be counted. On Meta a rule never acts on something still in its learning phase or changed in the last 2 days. Google supports campaign and ad_set levels only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| name | No | ||
| level | No | ||
| action | Yes | ||
| dry_run | No | TRUE previews without writing. Always preview first. | |
| rule_id | No | Required for update, enable, disable and delete. | |
| min_spend | No | Required on create. The entity must have spent at least this much before the rule may act. | |
| account_id | Yes | Meta act_... or bare 10-digit Google Ads customer id. | |
| conditions | No | ||
| entity_ids | No | Limit the rule to these specific entities. Omit to watch every entity at that level in the account. | |
| cooldown_hours | No | Default 24. |