How to Configure an Instagram Scenario in Scenario Builder?
Scenarios for Instagram can handle DMs, post comments, story mentions, and @mentions differently. This guide explains how to configure the Router and actions to route events to the correct scenario branches.
When You Need This
- You need different logic for DMs vs. post comments.
- You want to automatically reply to comments publicly.
- You need to route story mentions and @mentions into separate branches.
What You Should Know
- Router — a node that routes execution to different branches based on conditions.
- Instagram event types: Direct (DMs), post comment, story mention, @mention in comment.
- Public Reply action — sends a public reply to an Instagram comment (up to 2200 characters).
- Feature is available after platform configuration by the administrator.
Before You Begin
Step-by-Step Instructions
1. Add a Router Node
- On the canvas, click «+».
- Select Router in the Main category.
- Connect the start node (Channel Trigger with Instagram) to the Router.
- Connect the Router to your scenario branches.
2. Configure Conditions by Instagram Event Type
- Click the Router node — Node Inspector opens on the right.
- Add rules. In the Field dropdown, select Instagram Event Type.
- For each branch, set the value:
- direct_message — DMs (messages not from a story)
- story_mention — story mention
- post_comment — comment on a post (including promoted/boosted posts)
- mentions — @mention in a comment
- Save changes.
Note: Comments on promoted (boosted) posts are handled the same way as regular post comments — the post_comment event type applies to both. If your scenario needs to distinguish promoted from organic posts, you can use the
{{instagram_ad_id}}and{{instagram_ad_title}}variables (they are empty for organic posts).
Post link variable — {{instagram_post_url}}
In action fields, Call Node data, and scenario constants you can use {{instagram_post_url}} — a link to the Instagram post related to the event. It is usually filled for comments and @mentions on posts, so you can pass it to the operator or store a direct link to the post.
If no post link is available for the event (for example, the flow is mainly about a story), the value may be empty — then use {{instagram_story_url}} for story preview and links.
3. Add a Public Reply to a Comment (Optional)
If you want to automatically reply to comments in the post_comment branch:
- After the Router, add an Action node.
- Select the Instagram Public Reply template.
- In Comment ID, enter
{{instagram_comment_id}}(variable is substituted automatically). - In Message, enter the reply text (up to 2200 characters).
- Save changes.
4. Send a DM to the Client (Optional)
After a public reply, you can send a DM. Add the Instagram Send Direct Message action with Comment ID — the system will send a private message to the client in DMs.
What Happens Next
The scenario routes Instagram events by type: DMs, comments, story mentions, and @mentions go to their respective branches. Public replies are sent automatically according to your configuration.