Set up an automation
sprkly_create_automation_from_templateSet up one ready-made automation on one Instagram account and turn it on. This is the same as Go live in the app. It starts replying to real people right away, so show the user the template, the account, the word and the link first. Pass template_id from sprkly_list_automation_templates and profile_id from sprkly_list_profiles. If asks_for has post, pass post_id: a published Instagram post on that account. If it does not, leave post_id out. If asks_for has link, pass a full https link. keyword is optional and defaults to the template's word. message is optional and replaces the DM, or the public reply on a template that only replies in the comments. On first-comment-on-post, message is required: the comment sprkly adds under each new Instagram post it publishes on that account (up to 2,200 characters). That one is on Creator and Power, and an account can have one live. The coupon template is refused until message holds the real code instead of YOUR-CODE. If asks_for has faq, pass faq: 1 to 10 { keyword, answer } pairs. Each pair becomes its own automation that answers a DM of that word. fallback is optional there and becomes the account's default reply, for a DM with none of the words. It replaces any default reply already on that account, and turns it on if it was off, so tell the user first. A word another live automation already answers is refused. Calling again with the same list skips the words already live. Use sprkly_pause_automation to stop it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| faq | No | Only when asks_for has faq. The words people DM you and the answer each one gets. | |
| link | No | The https link the DM sends. Only when the template asks for a link. | |
| keyword | No | The word people comment or send. Defaults to the template's word. | |
| message | No | Your own words for the DM, for the public reply on a reply-only template, or for the comment on first-comment-on-post. | |
| post_id | No | The published Instagram post to watch. Only when the template asks for a post. | |
| fallback | No | Only with faq. The reply to a DM with none of the words. It replaces any default reply on the account and turns it on. | |
| profile_id | Yes | The Instagram account to set it up on. | |
| template_id | Yes | The template id from sprkly_list_automation_templates. |