Create automation
create_automationCreates a draft automation. Any field you leave out gets the app's default (friendly replies and DMs, a placeholder link). It doesn't run until you call go_live.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name shown in LedaChat. | |
| type | No | comment_to_dm (default): someone comments on a post. story_reply: someone replies to one of your stories. Can't be changed later. | |
| match | No | Reply to comments with specific keywords, or to any comment. | |
| postId | No | Instagram media id of the post or reel, from list_posts. Only for postScope specific; setting it also sets postScope to specific. Comment to DM only. | |
| linkUrl | No | Where the link button goes. Must start with https:// | |
| storyId | No | Instagram media id of a live story, from list_stories. Story Reply only; setting it also sets postScope to specific. | |
| keywords | No | Keywords that trigger the automation (case-insensitive). Replaces the whole list. | |
| postScope | No | Which posts or stories trigger it. Comment to DM: one specific post (set postId), the next post published after going live, or any post. Story Reply: one specific story (set storyId) or any story. | |
| extraLinks | No | Up to 2 more link buttons on the final DM, after the first. Each url must start with https://. Replaces the whole list; [] removes them. | |
| finalDmText | No | Final DM, sent after they tap the button (or send their email, when that step is on). | |
| openingDmText | No | First DM. Sent right after the comment. | |
| commentReplies | No | Public reply variants; one is picked at random. Replaces the whole list. | |
| followGateText | No | Sent after the tap to someone who doesn't follow yet. | |
| linkButtonLabel | No | Label of the link button on the final DM. | |
| emailCaptureText | No | The message that asks for their email. | |
| followGateEnabled | No | Only send the rest of the flow to people who follow the account, checked after the tap. Comment to DM only. | |
| commentReplyEnabled | No | Post a public reply under the comment. | |
| emailCaptureEnabled | No | Ask for their email after the tap, before the final DM. Emails are saved as leads. | |
| followGateRetryText | No | Sent each time they tap that button without following. | |
| openingDmButtonLabel | No | Button on the first DM. Tapping it sends the final DM. | |
| emailCaptureRetryText | No | Sent once if their reply doesn't contain an email. | |
| followGateButtonLabel | No | Button on the follow message. Tapping it checks again. |