Manage automation rule (adsap_manage_automation_rule)
Platform: Meta · Read or write: Write · Plan: Early Access · Consumes a task: No · Preview supported: Yes
What it does
Creates, changes, switches on or off, or deletes an automation rule for one ad account. A rule checks the account every day. When every condition is true, it either reports the match or turns the entity off. Ask for a preview first: the copilot reads the parsed rule back to you, including its guardrails, and applies it only after you confirm.
When to use it
- Use it to set up a daily check that reports, or pauses, campaigns, ad sets or ads that meet your conditions.
- It supports a preview call, and
dry_rundefaults totrue. Nothing is saved until a second call sendsdry_runasfalse. - A new rule needs
conditions,min_spendandmode.notifyonly reports.auto_actturns the entity off. - A rule takes 1 to 5 conditions and can be limited to 50 entities with
entity_ids. Withoutentity_idsit watches the whole account. update,enable,disableanddeleteneed arule_id. To see existing rules and what they did, useadsap_list_automation_rules.- Saving a rule calls neither Meta nor Google. The rule is stored in Adsap and checked each day.
Worked example
You ask
“In act_1234567890, pause any ad set whose cost per conversion goes over 40 in the last 3 days, once it has spent 50.”
The assistant calls adsap_manage_automation_rule
{
"action": "create",
"account_id": "act_1234567890",
"name": "Pause costly ad sets",
"level": "ad_set",
"conditions": [
{
"metric": "cpa",
"operator": ">",
"value": 40,
"timeframe_preset": "last_3_days"
}
],
"min_spend": 50,
"mode": "auto_act",
"dry_run": true
}Adsap returns
The field names are the ones Adsap returns. The values are examples.
{
"dry_run": true,
"would_create": {
"platform": "meta",
"ad_account_id": "act_1234567890",
"name": "Pause costly ad sets",
"level": "ad_set",
"scope": { "kind": "account" },
"conditions": [
{
"metric": "cpa",
"operator": ">",
"value": 40,
"timeframe_preset": "last_3_days"
}
],
"min_spend": 50,
"cooldown_hours": 24,
"exclude_recent_days": 1,
"learning_guard": true,
"mode": "auto_act",
"action": "pause",
"enabled": true
},
"guardrails": {
"min_spend": 50,
"cooldown_hours": 24,
"ignores_most_recent_days_for_conversion_metrics": 1,
"skips_entities_in_learning_or_changed_in_last_48h": true,
"acts": true
},
"next_step": "Read this back to the user in plain language, including the guardrails, and call again with dry_run false only after they confirm."
}How to read it
This is a preview. Nothing is saved yet. would_create is the rule as Adsap parsed it, with the defaults filled in: cooldown_hours is 24 and scope covers the whole account. guardrails says when the rule holds back. It waits for 50 of spend, ignores the most recent day for conversion metrics, and skips ad sets still in the learning phase. acts is true because mode is auto_act, so a match pauses the ad set.
The assistant reads the rule back to you in plain words. After you confirm, it sends the same call with dry_run set to false. That answer carries created and the new rule_id.
Parameters
Descriptions are shortened from the tool schema. Your assistant sees the full text.
| Name | Type | Required | Description |
|---|---|---|---|
action | one of create, update, enable, disable, delete | Yes | |
account_id | string | Yes | Meta act_… or bare 10-digit Google Ads customer id. |
rule_id | string | No | Required for update, enable, disable and delete. |
name | string | No | |
level | one of campaign, ad_set, ad | No | |
entity_ids | array of string | No | Limit the rule to these specific entities. Omit to watch every entity at that level in the account. |
conditions | array of object | No | |
conditions[].metric | one of spend, impressions, clicks, conversions, cpa, roas, ctr, link_ctr | Yes | cpa = cost per conversion, roas = return on spend, ctr = click rate. |
conditions[].operator | one of >, <, >=, <= | No | |
conditions[].value | number | Yes | |
conditions[].timeframe_preset | one of yesterday, last_3_days, last_7_days, last_14_days | No | |
min_spend | number | No | Required on create. The entity must have spent at least this much before the rule may act. |
cooldown_hours | integer | No | Default 24. |
mode | one of notify, auto_act | No | |
dry_run | boolean | No | Preview only: the request is validated and the resolved payload returned, nothing is created or changed. |
Example prompts
- “Create a rule that pauses any ad set spending more than $100 with zero purchases over 3 days.”
- “Set up a notify-only rule that flags ads with a cost per lead above 25 EUR after 50 EUR of spend.”
- “Disable the ‘Kill losers’ rule for now.”
Notes
Every rule needs a minimum spend before it fires, and conditions combine with AND. On Meta a rule never acts on entities still in the learning phase or changed in the last two days. On Google, rules work at the campaign and ad set levels only.
Related tools
adsap_get_recommendations: Verified recommendations AND alerts computed by Adsap’s daily/weekly checks from the client’s own data.adsap_list_automation_rules: List the automation rules on one ad account, and optionally what they have done.
Guide
Read Automation rules for the workflow around this tool, and the Tool reference for every tool.
The Meta Ads MCP server page shows how to connect Meta Ads to Claude, ChatGPT or Perplexity.