SociaHive Docs

Flow Patterns

Seven named patterns that cover most of what people build with SociaHive automation flows — keyword router, AI fallback, drip, comment-to-DM, and more.

SociaHive flows are graphs: nodes are actions or branches, edges are paths. Most flows are variations on a small set of patterns. Knowing them by name makes it easier to describe what you want to an AI assistant.

This is SociaHive's equivalent of a prompt library — opinionated, named patterns instead of an endpoint dump.

Keyword router

"If the comment says X, do A. If it says Y, do B. Otherwise do C."

[trigger: post_comment] → [condition: keyword "price"]  → [comment_reply: pricing]
                                            ↓ no
                                 [condition: keyword "demo"] → [comment_reply: demo link]
                                            ↓ no
                                 [comment_reply: thanks]

When: any auto-reply that branches on what the user said. MCP shortcut: generate_flow with description "Branch on keywords X, Y; default to Z". The AI picks condition nodes correctly.

AI fallback

"Try a template reply first. If the message doesn't match any template, hand off to AI."

[trigger: message] → [condition: matches template?] → [message: template]
                              ↓ no
                     [ai_response]

                     [condition: confident?] → [continue conversation]
                              ↓ no
                     [action: handoff_to_human]

When: customer support, inbound DMs where most messages are predictable but you want graceful degradation. Why this beats pure AI: template replies cost 0 credits and never hallucinate. AI only fires when the template can't.

Data collection funnel

"Ask name, then email, then qualifying question — drop into CRM."

[trigger: message] → [data_collection: first_name]

                    [data_collection: email]

                    [data_collection: company_size, choices=[1-10, 11-50, 51+]]

                    [action: add_tag "qualified-lead"]

                    [message: booking link]

When: lead capture, demo booking, applicant intake. Pro tip: data_collection nodes have built-in validation. Use email, phone, url types — SociaHive enforces format.

Drip with branches

"Day 0: welcome. Day 2: tutorial. Day 5: ask if they need help. Branch on reply."

[trigger: subscribe] → [message: welcome]

                    [delay: 2 days]

                    [message: tutorial]

                    [delay: 3 days]

                    [message: "still using us?"]
                       ↙       ↘
                  [yes]         [no/no_reply: 24h]
                    ↓                ↓
              [message: tips]   [action: tag "at-risk"]

When: onboarding sequences, course delivery, win-back flows.

Watch the gap

Delays longer than 7 days see ~95% drop-off. Tighter usually wins.

Comment → DM conversion

"Public comment reply ('DMing you now!') paired with a private DM."

[trigger: post_comment, keyword "info"] → [comment: "DMing you now! 📩"]

                                              [instagram: opening_dm, body="Here's the info..."]

When: the bread-and-butter Instagram play. Public reply boosts algorithm signal; DM moves the user to a higher-intent surface.

Instagram opening-DM rule

The first DM in this flow needs isOpeningDm: true — Meta blocks unsolicited DMs sent by businesses. The MCP generate_flow tool sets this automatically; if you're wiring nodes by hand, set it on the first message node after the public comment reply.

Webhook-on-completion

"When this flow finishes, ping our CRM."

[…flow…] → [last node] → [webhook: POST https://crm.example.com/lead, body=$context]

When: integration with external systems (HubSpot, Salesforce, custom CRMs) before native connectors land. Tip: the webhook node sends the entire flow execution context — every collected value, tag, variable. Easier than building data per-call.

Randomizer A/B/C/D

"Send variant A or B or C or D, 25/25/25/25."

[trigger] → [randomizer: 4 variants]
                ↓        ↓        ↓        ↓
            [msg: A] [msg: B] [msg: C] [msg: D]
                ↓        ↓        ↓        ↓
            [tag: A]  [tag: B] [tag: C] [tag: D]

When: A/B testing copy or AI prompts. Tag downstream so analytics filter by variant.

Tier-gated

The randomizer node is available on Scale and Agency plans.

Anti-patterns

  • Infinite loop. A flow whose last edge points back to its trigger. SociaHive's engine guards via max-depth, but you burn credits on the way.
  • 100-node monolith. If a flow has >30 nodes, split it. Use one to qualify, then trigger another via tag or sequence.
  • AI for trivial branches. A condition node is free; ai_response costs 5 credits. Don't pay 5 to decide "yes or no."

Pattern → goal mapping

GoalPattern
Reply faster to common DMsAI fallback
Build an email list off InstagramComment → DM, then data collection funnel
Send a course over 2 weeksDrip with branches
Route comments by intentKeyword router
Run an A/B testRandomizer
Hand off to a human inboxAI fallback (human-handoff variant)
Push lead data to your CRMWebhook-on-completion

Building one of these

The fastest way is to describe it to your AI assistant via MCP and let it call generate_flow. See the MCP setup guide to connect Claude / ChatGPT / Cursor, then prompt something like:

Build a SociaHive flow using the "comment → DM" pattern: when an Instagram comment contains "price" on any of my posts, reply publicly with "DMing you now! 📩" and send a DM with my pricing link.

Or wire it directly via the SDK — see the developer quickstart.

On this page