Instagram Chatbots
Workflow Bots can run on Instagram in addition to WhatsApp. Pick the channel when you create the bot — channel is permanent post-create. The same flow editor, the same node palette (minus a few WA-only nodes), and the marquee feature: a Send WhatsApp Template node that hands a qualified lead from Instagram to WhatsApp for richer engagement.
Plan + connection requirements: Instagram bots need a plan with Instagram Automation enabled, AND a connected Instagram Business account at /instagram-automation. Trial users get full access.
Channel scoping
Each bot is either WhatsApp or Instagram, picked at create-time and immutable. The flow editor renders the matching node palette per channel — IG bots don’t see WA-only nodes (and vice versa).
| Concern | ||
|---|---|---|
| Trigger types | Keyword, any-message, CTWA Ads | DM keyword, DM any, story reply, comment-on-post |
| Send-type nodes | Text, media, button, list, CTA, template, carousel | Text, media, button (quick-replies), Send WhatsApp Template (handoff) |
| Ask-type nodes | Text, number, email, phone, date, URL, media, file, location | Text, number, email, phone, date, URL, media (no file, no location) |
| 24h/7d window | Not enforced | Auto-attaches HUMAN_AGENT tag 24h–7d, refuses send beyond 7d |
| Default-bot star | Independent — one default per channel | Independent — one default per channel |
IG trigger types
Pick one per bot in the On Message node:
- Any DM — fires on any plain inbound DM. Story replies and comment-triggered DMs are excluded so they can be handled by their dedicated triggers.
- DM Keyword — case-insensitive substring match against keywords you list. Optional fuzzy / case-match toggles match the WA keyword UI.
- Story Reply — fires when a customer replies to one of your stories. Optional story-id filter restricts to specific stories; empty = any story.
- Comment on Post — fires when a customer comments on a post you pick from the IG media grid. Optional keyword filter restricts to comments containing certain words.
All four support the standard behavior gates (every message / only-once-per-contact / only-if-resolved).
Constraint on comment triggers
When the trigger is Comment on Post, the first node connected after the trigger MUST be a Send-type (Send Text / Send Media / Send Button). The bot replies via Meta’s comment-scoped private-reply API which only accepts the immediate content of the reply — there’s no way to “run the bot to completion before sending.” If the first node is a Condition or Delay, the customer never receives a DM and the session never starts. Save fails with a clear error if you try.
Comment trigger overlap with comment-to-DM rules
If a comment-to-DM rule on the same post + keyword matches first, the rule fires and the bot is skipped. So:
- For one-shot DM replies → use a comment-to-DM rule
- For multi-step qualification flows → use a bot with a comment trigger
- Don’t put both on the same post + keyword — only the rule will run
Send WhatsApp Template (cross-channel handoff)
The marquee feature. Drop this node anywhere in your IG flow to hand off to WhatsApp:
- Phone source variable — pick the variable that holds the captured phone (typically the saveAs of an Ask Phone node earlier in the flow).
- WhatsApp template — pick an APPROVED template from your WA template library.
- Variable mapping — map body / header / button params, same UI as the WA Send Template node.
- After handoff — choose what happens next:
- End IG flow (default): one-shot template send, IG flow stops.
- Continue on WhatsApp via bot…: chained WA bot resumes when the customer replies on WA. IG-captured variables transfer verbatim into the WA session.
- Compliance acknowledgement — required to save. Confirms the recipient has opted into WhatsApp messages. Marketing templates without explicit opt-in violate Meta policy.
When the node fires, we:
- Find or create a WA contact tagged
instagram-handoffwithmetadata.source_ig_conversation_idcross-linking back to the originating IG conversation. - Find or create the WA conversation row (channel=‘whatsapp’).
- Send the template via your standard WA messaging path. Wallet deduction + reseller markup apply normally.
- (If continue-on-WA) insert a paused chatbot session keyed on the WA conversation + chosen bot. The customer’s first WA reply resumes the bot.
- Record a
cross_channel_handoffrow in the activity log with both conversation ids.
If the phone variable is empty / invalid, or the user has no WABA connected, the node logs an audit row and advances the flow without sending — surrounding nodes (CRM tag updates, audit webhooks, etc.) still run.
24h / 7d messaging window
Meta restricts who you can DM and when:
- 0–24h since the customer’s last inbound: send freely.
- 24h–7d: the IG send layer auto-attaches the
HUMAN_AGENTmessage tag. The bot still works but Meta’s policy requires this for non-promotional follow-ups. - Beyond 7d: Meta refuses the send. The flow logs the skip and advances to the next node — Condition / HTTP / UpdateColumn / UpdateTag / SendWhatsAppTemplate still run for an expired-window contact.
The Send WhatsApp Template handoff is the one path that bypasses the window, since WA templates have their own opt-in policy.
Setting a default IG bot
Independent from the default WA bot. Star button on each bot row in /ai-agents — IG bots get a pink star, WA bots emerald. Stars per channel are independent: starring an IG bot doesn’t unstar your WA default.
Inbound IG DMs that don’t match a more specific bot (keyword / story / comment) fall through to the default IG bot if one is set, OR to the welcome / off-hours auto-reply if those are configured under Settings → Live Chat.
What lives where
- Bot creation + channel pick — /ai-agents → Create Agent → Workflow Bot → pick WhatsApp or Instagram.
- Flow builder — /chatbot/[id] — same canvas as WA bots, IG-pink accent + filtered palette.
- Comment-to-DM rules (one-shot) — /instagram-automation — keep for simple “comment X → DM Y” use cases.
- Default-bot star + channel pill — agent list at /ai-agents.
- Live testing — /messages Instagram tab; bots fire on real inbound.