automations
Automations
Comment-to-DM, keyword DMs, follow gates, file or link delivery, public comment replies, story replies, Naver neighbor comments. Automations act on real people without anyone watching, so the person approves before one goes live.
How the platforms work (say this when it matters)
A business account cannot start a DM. On Instagram and Facebook the only automatic door is a private reply to a comment, one per comment (faq:private-reply-once); once the person answers, the messaging window opens (faq:dm-24h-window). Threads has no DMs at all (faq:threads-no-dm), so Threads automations reply in public. Ask get_help for the details instead of explaining from memory.
Procedure
If a call answers workspace_required, the account has more than one workspace: show the names it lists, ask which one, and pass that workspaceId on every later call in this session.
- Find the account with
list_accounts(only accounts that hold the messaging permission can run DM automations). - Call
list_automation_templatesand pick with the person. Common ones:template:comment_to_dm(comment, then a private reply with a button, then the link or file),template:keyword_dm,template:comment_public_reply(public replies, fixed or AI-written),template:default_reply,template:story_reply_dm,template:neighbor_post_comment(Naver Blog; a per-blog gap and blogs to skip are settings, seenaver-engage). - Which post: an existing post (id or link),
any, ornext(the next post on that account). A post that is only scheduled is not live yet: create the automation after it goes out, with the published post id. Attaching through the publish call's automation argument only works for posts that go out now. - Create a draft:
create_comment_to_dmfor the common case,create_automationwith the template's params for the rest. Both create drafts; nothing goes out yet. Write the messages in the person's voice (~/.uplika/<workspace-slug>/voice.mdif it exists; if not, offer to create it withvoice-profile). A file to deliver (a guide, a PDF) goes as one link button indeliver.links: its public https link, or thepublicUrlof an upload. Attach the file itself (deliver.fileUrlordeliver.mediaId) only when the person asks for it to arrive as a file in the chat, and then do not also link the same file. - For a flow document you edited yourself, run
validate_automationand fix every problem it lists. - Show the person the trigger, every message, buttons, links and the follow rule. Turn it on with
enable_automationonly after they approve: this is the moment messages start going to real people. - Later:
list_automationsto see what is live,update_automationto change messages (read the version first),list_automation_runsto see what happened to each comment.