How do I branch an automation by what the contact wrote?
Add the Trigger reply condition inside the Router step (or Condition) and compare the text the contact sent — the Instagram comment, story reply, direct message, or the WhatsApp message that triggered the automation. One automation then handles several keywords, instead of you duplicating the whole flow for each one.
Role: any member with edit access to the workspace.
Before you start
- An automation whose trigger is an incoming message or comment (post, reel or live comment on Instagram, story reply, Instagram direct message, or a message received on WhatsApp).
- The matching channel connected under Messaging.
Steps
-
On the automation canvas, click the + where the split should go and choose Router.
-
Under When a lead matches..., pick One path (follows only the first matching path) or Multiple paths.
-
On path 1, give it a name that describes the intent (for example,
Wants the link) and click Add condition. -
In the left column of the menu, open the Instagram or WhatsApp tab. The condition appears in both, named after the tab's channel — Trigger reply (Instagram) or Trigger reply (WhatsApp) — and behaves the same either way.
-
Click the condition.
-
On the condition card, pick the operator and type the text to compare:
-
Repeat on the other paths, one text per path. Use Add path to create more (up to 10).
-
Connect each path's output to the step that should run, and also connect the Otherwise output — that is where contacts that match no path go.
What the comparison considers
- Case does not matter.
WantmatcheswantandWANT. - Leading and trailing spaces are ignored.
bilhonequalsbilhon. - Accents matter.
preçodoes not matchpreco— if contacts write it both ways, create a path for each, or use two paths with Multiple paths mode. - It compares snippets, not whole words. With contains and the text
link, a comment likeblinkarmatches too. Prefer equals when you need the exact word.
When the contact wrote nothing
If the automation started from a trigger that is not a message (a tag applied, a purchase, a schedule), there is no text to compare. In that case:
- positive operators (contains, equals, starts with, ends with) do not match;
- negative operators (does not contain, does not equal, does not start with, does not end with) do match.
If that is not what you want, put the text condition in a Router that only receives contacts coming from the message trigger.
If it did not work
- Every contact falls into Otherwise: check that the automation trigger really is an incoming message or comment, and that the text you typed has no extra space or accent.
- The automation will not publish: the builder warns when a text condition has no value — fill in the text to compare on every path.
- The contact took the wrong path: with One path, the first matching path wins, top to bottom. Reorder the paths or switch to Multiple paths.
Related
- Automations — how a flow works end to end.
- Automation triggers — the full catalog of events that start a flow.
- Messaging — connect the Instagram and WhatsApp channels.