Skip to content

Automation rules with an assistant

Create, test, enable and change AdMassy automation rules over MCP, with the scopes they need, dry runs, revisions and alert deliveries.

Last updated

On this page

Assistants can manage the same automation rules you see in Automate › Rules. AdMassy runs its own rules on a schedule; native Meta automated rules can only be read (list_rules, get_rule, get_rule_history).

What you need

  • Reading rules: any connection with performance:read (included in Read only).
  • Creating, changing, archiving or running rules: Read and write, which includes performance:manage.

Create a rule

The assistant calls create_rule (the same tool is also available as create_automation and create_performance_threshold) with:

  • name, actionType (TURN_OFF, TURN_ON, NOTIFICATION, budget increase/decrease or SET_BUDGET),
  • entityType (AD, ADSET or CAMPAIGN), optionally limited to a campaignId or adsetId,
  • conditions such as {field: "spend", operator: "GREATER_THAN", value: 30},
  • timeRange (TODAY … LAST_30_DAYS, LIFETIME), cooldownHours, and for budget actions budgetValue, budgetValueType, maxDailyCap or minBudget.

Rules are saved disabled unless status is ACTIVE. Saving an enabled rule that pauses, starts or changes budgets needs confirm: true, which the assistant may only send after you approved the action.

Test before enabling

  1. performance_refresh_report refreshes the stored report the rules read.
  2. execute_automation {id, dryRun: true} evaluates the rule now without any action and shows what would match.
  3. When you are happy, update_rule with status ACTIVE and confirm: true.

Without dryRun, execute_automation runs the account's enabled rules now, exactly like a scheduled check.

Change or archive a rule

update_rule and delete_rule need the rule id and its current revision (from get_automation or list_automations). If someone changed the rule in the meantime, the call is refused; the assistant reloads it and tries again. delete_rule archives the rule; its history is kept.

Follow what rules did

  • list_automation_executions: recent evaluations and actions.
  • performance_activity: the full activity journal.
  • rule_outbound_channels and rule_outbound_deliveries: webhook and email alerts; rule_outbound_command retries or cancels one delivery. Channels themselves are set up in the app.

Run a rule on Facebook

Simple rules can run on Facebook instead of AdMassy: Facebook then checks them itself, at no cost to your workspace. A rule qualifies when Facebook can run it exactly:

  • conditions combined with AND, on one time range (today, yesterday, last 3, 7, 14 or 30 days),
  • the action notifies, pauses, starts or changes a budget,
  • it checks every 30 minutes, hourly, daily or at set hours (not every 15 minutes).

In Automate › Rules, such a rule shows Run on Facebook; other rules show why they stay on AdMassy (for example ranking conditions, renaming or duplicating). An assistant uses run_rule_on_facebook with host: "meta" (and confirm: true for an enabled pause or budget rule, after you approved it), or host: "admassy" to move it back.

While a rule runs on Facebook, AdMassy no longer checks it, and edits you save in AdMassy are sent to Facebook. Facebook acts directly, without AdMassy's checks for stale data, and the rule also appears in Ads Manager.

Budget guardrails are separate

Confirmation rules (warn or block launches above a budget) can be read by anyone with confirmation_rules and confirmation_rule_changes. Owners and admins on a read-and-write connection can change them with save_confirmation_rule, update_confirmation_rule and delete_confirmation_rule.

Was this article helpful?