Automations: Flow Builder
Building automation flows for your WhatsApp campaigns.
The Flow Builder lets you build automated conversations that run on your WhatsApp number without any code. You lay out nodes on a canvas, connect them, and WhatsApp walks your customer down whichever path they choose. Every flow is triggered by an incoming message from a customer.
Go to WhatsApp > Automations in the left hand menu in your SMSPortal account where you can start building your first automation.
How a flow gets triggered
- As the default for a WhatsApp number, assign the flow to one or more numbers in Settings. Anyone who messages that number starts this flow.
- Attached to a template, the flow is connected to a template you send to an audience. This is a one-time run: once the customer completes it, that flow is finished for them.
When a flow ends or the customer exits it, one of three things happens. If a different flow is the default for that number, it takes over on their next message. If this flow is the default, it restarts. If no default is set, nothing happens.
Worth planning for: if you're attaching a flow to a template campaign, decide up front what customers land on afterwards. No default means a customer who replies again gets silence.
Step 1: The canvas
- The flow name sits top-left and can be edited.
- The Incoming response node is always first, is fixed, and can't be deleted. It marks where the flow begins and everything hangs off it.
- Top-right: the black + button and the settings cog. Bottom-left: fit-to-view (re-frames the whole flow), zoom in/out, undo and redo. Bottom-right: a minimap.
Step 2: Adding nodes
Every node has green + connectors on its right edge. Either click the + to pick a node from a menu and have it placed for you, or click and drag from the + and release anywhere on the canvas to create it at that point.
Nodes that offer choices have a separate + on each individual button, which is how branching works. Each option gets its own connector and its own path.
Types of Nodes
| Node | What it does | Key fields |
|---|---|---|
| Reply buttons | Offers quick reply buttons with your message for fast responses | Header (optional), Message body (required), Footer (optional), up to 3 buttons, Save user's answer to a variable (optional) |
| List buttons | Offers a list of options hidden behind a tappable list header | Same as above, plus List header / CTA (the button label, e.g. "Menu") and up to 10 menu items, Save user's answer to a variable (optional) |
| Ask question | Sends a question, then waits for the customer to reply in their own words. The reply can be saved to a variable | Question (required), Save user's answer to a variable (optional) |
| Send message | Sends a combination of messages and/or images, up to 3 | Text and media blocks in any order. Media via Image library upload or From URL (jpeg, png, gif, svg) |
| Emoji reaction | Reacts with an emoji to the customer's most recent reply | Emoji picker only. Usually followed by another node |
| Webhook | Sends an HTTP request to an external service, carrying the variables you've collected | Request URL (required), Custom Headers (optional), Custom Body |
| Close chat | Ends the conversation flow and sets status to closed | No configuration, just drop it onto a path |
Character limits on button nodes. Buttons are capped at 20 characters. Rich text (bold using asterisks, for example) is not supported inside buttons. Body text is capped at 1,024 characters, and if you insert variables their content counts toward that limit, which may cause the message to be truncated on the handset.
Reply buttons vs List buttons. Reply buttons show all options immediately, best for two or three obvious choices. List buttons hide options behind one extra tap, use for four or more, or where labels are long.
Reordering and deleting. Use the drag handle (six dots) to reorder buttons or message blocks, and the bin icon to delete. Deleting a button also removes the path leading out of it.
Variables: saving and reusing customer answers
Variables let you capture what a customer tells you and use it again later in the same flow, either in a message back to them or in an HTTP request out to your own systems.
The two built-in variables
Every flow has two variables available from the start, with nothing to set up:
- name: the customer's WhatsApp display name, as they have configured it on their handset.
- number: the number they are messaging you from. (This is available if the user has allowed their number to be shared)
Saving an answer to a variable
Three nodes can save a customer's answer: Ask question, Reply buttons and List buttons.
Scroll to the bottom of any of those nodes and you will find Save user's answer to a variable. Either select a variable you have already created, or create a new one here.
This is optional on every node. Leave the field empty and the node behaves exactly as it always has, it just doesn't keep the answer. Only fill it in when you want to use that answer later in the flow, either in a message back to the customer or in a Webhook request.
When you do want to save an answer, the variable has to exist first, as there is no automatic capture. Create it from the field on the node itself if you haven't already.
What gets saved depends on the node:
- Ask question sends your question, then waits for the customer to reply. Whatever they type is saved.
- Reply buttons and List buttons save the option the customer chose.
Using a variable in a message
Anywhere you write a message (Send message, Ask question, Reply buttons and List buttons), the formatting toolbar above the text box starts with a curly-braces button, . Click it to open a dropdown of every variable available in this flow, and select one to insert it.
Inserted variables appear in the text wrapped in double @ symbols, like @@season@@. When the message is sent, that is replaced with what the customer actually said. So a Send message node containing your favourite season is @@season@@ goes out as "your favourite season is winter".
Order matters. A variable only has a value once the customer has passed the node that saves it. Referencing a variable earlier in the flow than the node that fills it will leave you with nothing to insert.
Sending data out: the Webhook node
The Webhook node sends an HTTP request to an external service with a customisable body. Use it to push the answers you've collected back into your CRM, database or any endpoint you choose.
- Request URL, the method (POST) and the endpoint everything is sent to.
- Custom Headers, off by default. Toggle it on if your endpoint needs headers such as an Authorization header.
- Custom Body, the request body, in JSON only. When you add a Webhook node, the body is pre-populated with every variable available in the flow at that moment. A Valid JSON indicator below the editor confirms the body will send.
Built your flow first and added variables afterwards? The body won't know about them. Click Reset default above the editor and the request body is rebuilt with all the variables currently available in the flow.
Ending a flow: Close chat vs running dry
The most important behaviour to understand, and the easiest to get wrong.
- No Close chat node, the flow just runs out and the conversation stays open. The customer can scroll back up, tap a different button on an earlier message, and go down another branch. Sometimes that's what you want.
- With a Close chat node, the conversation closes. There will be no effect if the user tries to interact with previous nodes from the conversation (such as a reply button). The only way forward is a fresh incoming message, which starts the default flow (or this one again, if it's the default).
Use Close chat for surveys, competitions and opt-ins, or anything where re-answering an earlier question would corrupt your results or loop the customer.
The "None of the above" path (Optional)
Both button nodes automatically include a None of the above row, marked with a star. You can't create or delete it. It's the catch-all: if the customer types instead of tapping, they go down this path.
Working with paths
- Select a node to highlight its incoming and outgoing paths in blue. Hover a path to bring it to the front where several overlap.
- Delete a path by hovering and clicking the delete icon.
- Re-route a path by grabbing it at its origin connector and dragging it onto a different node.
- Converge paths, several branches can point at the same node. Build a shared ending once rather than duplicating it.
Step 3: Assign the flow to a number
Click the settings cog on the right hand side of your canvas, choose your numbers under Assign mobile number(s), and click Apply Changes.
Please note: this automation flow will become the default for the selected number(s) and will launch when a user first messages you.
A number can only have one default flow, so this replaces whatever was set there before.
Step 4: Saving and publishing
Your work saves automatically, shown by the green tick and Saved in the top bar. That does not make it live. Clicking Publish pushes the current version live, and the indicator changes to Published. Only the published version runs.
The version customers are actually seeing. Anyone halfway through a flow stays on the version that was live when their conversation started. Publishing mid-conversation doesn't move them across, they have to exit and re-trigger the flow to pick up the new version.
If a change isn't appearing, check in this order:
- Did you click Publish, or is it only Saved?
- Is the flow assigned to the number you're messaging?
- Are you still inside a conversation that started on the previous version?
Updated 1 day ago
