meta_ads_ad_rules_create
Create automated rules for Meta Ads to trigger actions like notifications, pausing ads, or adjusting budgets when performance metrics meet specified conditions.
Instructions
Creates a new Automated Rule that Meta evaluates on the configured schedule and fires actions when the trigger matches. Returns the new rule_id. Mutating, reversible via rollback_apply (rollback disables the rule; actions the rule already took stand). Common patterns: CPA-spike alert (execution NOTIFICATION), auto-pause ads with low ROAS (execution PAUSE), scale winners (execution CHANGE_BUDGET). evaluation_spec and execution_spec are Meta's JSON schemas — see Meta Ads Automated Rules API docs for the field set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Meta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required. | |
| name | Yes | Rule name shown in Ads Manager. Should name the trigger and action (e.g. 'Pause ads CPA > target × 2'). | |
| evaluation_spec | Yes | Trigger definition. Shape: {evaluation_type: SCHEDULE | TRIGGER, filters: [{field, operator, value}, ...]}. Filters combine with AND; for OR create multiple rules. | |
| execution_spec | Yes | Action definition. Shape: {execution_type: NOTIFICATION | PAUSE_CAMPAIGNS | UNPAUSE_CAMPAIGNS | CHANGE_BUDGET | CHANGE_BID, execution_options: [...]}. Budget/bid changes use delta or absolute value per execution_options. | |
| schedule_spec | No | When the rule runs. Shape: {schedule_type: SEMI_HOURLY | DAILY | CUSTOM, schedule: [time specs]}. Default SEMI_HOURLY evaluates every 30 minutes. | |
| status | No | Initial status. Default ENABLED. Create with DISABLED and enable later to stage the rule without side effects. |