create_automation
Create a new automation for a LinkedIn post. Always created as Draft - you must activate it separately. Supports keywords, DM templates, comment replies, repost-specific DM/replies, and settings like auto-connect and auto-like. keywords: [] is valid and means "reply to every commenter". To automate a post the user has NOT published yet, set automate_next_post: true and omit post_url — it arms itself and attaches to their next original post automatically. To duplicate an existing automation, read it with get_automation and copy all its reply sets: dm_templates, comment_reply_templates and non_first_degree_reply_templates (the replies for commenters who aren't connected), plus repost_dm_template / repost_comment_reply_templates if set.
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": {
"post_url": "<post_url>"
},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| act_as | No | APEX+ or admin act_as (optional): operate this tool AS one of your managed profiles — pass that profile's LeadShark account email (see list_profiles). Requires an active delegation from the profile owner plus an APEX+ plan or admin act_as enabled by LeadShark (which runs on the profile's own plan); anything else is refused with a reason, never silently redirected. The action runs under the managed profile's own budgets, approval queue, and action log. With a Team key, act_as is required on every call and must be one of the key's accounts (list_profiles); the call must also be within the permission groups the key has on that account, or it's refused with permission_missing. Hourly/daily limits are that profile's own. | |
| keywords | No | Trigger keywords (e.g., ["interested", "send", "want"]) | |
| post_url | Yes | LinkedIn post URL to automate. Omit when using automate_next_post. | |
| settings | No | ||
| offer_url | No | URL to include in DM (e.g., lead magnet link) | |
| instruction | No | Natural language instruction describing what the automation should do | |
| dm_templates | No | DM message templates. Use {{firstName}}, {{fullName}}, {{linkedinUsername}} | |
| automate_next_post | No | Automate Next Post: arm this automation for a post the user has not published yet. It waits, then attaches itself to their next ORIGINAL post (reposts ignored) — usually within ~15 minutes of publishing. Omit post_url when using this; passing both is an error. Only one armed next-post automation is allowed at a time. Unlike a normal automation this is created armed (status 'Next'), not Draft, because that is what makes it wait — there is nothing to activate afterwards. | |
| repost_dm_template | No | Optional. A DIFFERENT DM sent to people who REPOST the post (instead of / in addition to the normal DM — see settings.only_repost_dm). Same variables as dm_templates. Mirrors the REST field repost_specific_dm. | |
| comment_reply_templates | No | Comment reply templates. Use {{fullNameMention}} for @mentions | |
| repost_comment_reply_templates | No | Optional. Comment replies used for commenters who ALSO reposted the post. Mirrors the REST field repost_comment_reply_template. | |
| non_first_degree_reply_templates | No | Comment replies used when the commenter is NOT a 1st-degree connection (no DM possible) — put the link in the reply instead. suggest_automation_settings returns these. Use {{fullNameMention}} for @mentions |