Instagram Comments
The Instagram Comments trigger lets the agent reply to comments on the business account’s posts — limited to the posts and keywords you choose. Unlike Instagram Direct, here the agent acts publicly, in the comments thread of each post.
Requirements
Section titled “Requirements”Same as Instagram Direct:
- Instagram Business or Creator account;
- linked Facebook Page;
- admin permission on the Facebook Page at the time of authorization.
If you’ve already connected Instagram for the Direct trigger on the same agent, the authorization is shared — no need to log in again.
Connecting
Section titled “Connecting”- Open the agent in the admin panel.
- Go to Triggers.
- In the Instagram Comments card, click Connect Instagram.
- Log in to the business account in the Meta popup and approve the permissions.
- When the popup closes, the card shows Connected: @your_handle and reveals the config blocks.
Configuring filters
Section titled “Configuring filters”Configuration has three blocks. After any change, click Save.
1. Monitored posts
Section titled “1. Monitored posts”Decide where the agent will act:
- All account posts — replies to any comment on any post. Use with care: older posts with many comments can drive high volume and cost.
- Selected posts (recommended) — click + Add post and pick posts manually. The modal shows a grid of account posts with infinite scroll. Limit: 100 posts per trigger.
2. Keywords
Section titled “2. Keywords”Filter which comments the agent will reply to. Useful to skip generic “thanks” or “lol” comments.
- Keyword list: type and press Enter (or comma) to add. Limit: 50 keywords, 64 chars each.
- Mode:
- Any — comment matches if it contains at least one keyword.
- All — comment must contain all keywords.
- None — comment matches if it contains none of them (list works as a blocklist).
- Match type:
- Contains — simple substring.
- Exact — comment must equal the term.
- Regex — regular expression. SquadOS validates and rejects unsafe or slow regex.
- Case sensitive — off by default.
With no keywords at all, the agent replies to every comment that passes block 3 filters.
3. Advanced
Section titled “3. Advanced”- Ignore thread replies (default: on) — only top-level comments are answered, not replies inside another thread.
- Private reply via DM — when on, the agent replies via DM instead of a public comment. Fallback (
public) reverts to public comment if the DM fails.
The agent never replies to its own comments — including the replies it posts itself. This is automatic and not configurable: it guarantees the agent won’t loop replying to itself.
How it works
Section titled “How it works”- Instagram fires a webhook on every new comment in monitored posts.
- SquadOS applies the filters (keywords + exclusions).
- If the comment passes, the agent processes and replies.
- The reply lands publicly in the thread (or via DM if you enabled it).
Direct vs Comments
Section titled “Direct vs Comments”| Aspect | Direct (DM) | Comments |
|---|---|---|
| Channel | Private DM | Public comment on the post |
| Visibility | Only the user sees it | Anyone who sees the post sees it |
| Filters | None — replies to everything | Per post + keywords + advanced |
| Exposure risk | Low | High: agent mistakes are public |
| Use for | 1:1 support | Pre-sales, FAQ, post engagement |
Use cases
Section titled “Use cases”- Product launch: filter words like
price,buy,linkon campaign posts. - FAQ on a pinned post: the “common questions” post auto-replies to recurring terms.
- Qualified engagement: answer only specific questions, leave the rest for human follow-up.
Limits and notes
Section titled “Limits and notes”- Limit of 100 monitored posts per trigger.
- Limit of 50 keywords per trigger.
- Unsafe or slow regex is rejected (ReDoS protection).
- Because it’s a public channel, review the prompt and test before activating on high-engagement posts. A bad agent reply is visible to everyone.
- The token shared with Instagram Direct lasts 60 days and is renewed automatically.
Common issues
Section titled “Common issues”- The ”+ Add post” selector is empty: the connected account has no posts of its own. Usually the posts are Collab posts that belong to whoever published them — connect the owner account. See the note in the Monitored posts section.
- Agent doesn’t reply to any comment: make sure at least one post is selected and that the keywords aren’t too restrictive.
- Agent is over-replying: narrow keywords, switch mode to All, or move from All posts to Selected posts.
- Regex rejected: the validator blocks patterns that may hang (for example
(a+)+). Simplify the expression. - “Token expired”: reconnect Instagram from the card.