create_dm_automation
Create Instagram and Facebook DM automation rules for comment keywords, DM keywords, story replies, default replies, or campaign links; replies are paced by the platform.
Instructions
Create a DM automation rule. trigger_type: comment_keyword (comment → DM; REQUIRES opening_message + button_label — Meta's two-step opt-in, enforced), dm_keyword, story_reply_keyword, default_reply, or ref_link (campaign DM link; Instagram requires conversation starters on the account, verified at create — a 502 means the check could not run, retry). Sending always goes through the platform's pacing engine; there is no send-a-DM-now tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"platform": "<platform>",
"account_id": "<account_id>",
"trigger_type": "<trigger_type>"
},
"name": "create_dm_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| active | No | Default true. Set false to create paused. | |
| keywords | No | Trigger keywords (required for *_keyword triggers; the campaign name for ref_link). | |
| platform | Yes | ||
| ai_prompt | No | Instructions for AI replies. | |
| account_id | Yes | Account id from list_accounts. | |
| ai_enabled | No | AI-composed replies (not for comment_keyword). Requires ai_prompt. | |
| match_type | No | Default "contains". | |
| button_label | No | comment_keyword: the opt-in button text. Required for comment_keyword. | |
| trigger_type | Yes | ||
| reply_variants | No | DM reply message(s) — one is rotated per send. Required unless ai_enabled. | |
| opening_message | No | comment_keyword: the opt-in DM shown with the button. Required for comment_keyword. | |
| once_per_user_hours | No | Per-person cooldown in hours. 0 disables. | |
| public_reply_variants | No | comment_keyword only: public comment replies (e.g. "Check your DMs!"). |