WWP Engine Docs

Flow Builder

Reference for node types, routing, variables, and validation in the visual flow builder

Flows are directed graphs. A Trigger starts the run, each node returns an outcome, and edges decide where execution goes next. Nodes pass data through run context and reusable variables.

Core concepts

ConceptMeaning
NodeA step in the automation, such as sending a message or calling an API
EdgeA connection from one node to another
OutcomeThe result a node returns, such as default, success, error, or timeout
ContextPer-run data produced by trigger events and nodes
VariablesNamed values created by Set Variable, User Input, or LLM nodes
Parking nodeA node that can pause the run until a future message or timer resumes it

Use template variables in supported fields:

{{nodes.trigger.message}}
{{variables.customerName}}

Undefined or null values resolve to an empty string.

Trigger

Entry point for every flow. It inspects incoming WhatsApp messages and decides whether the flow should start.

FieldDescription
Trigger typeincoming_message
Modekeyword or regex
KeywordComma-separated words, converted to a case-insensitive regex
RegexRaw case-insensitive regex pattern

A blank keyword/regex behaves as a catch-all trigger.

Edges: default

Context output: message text, remote JID, message ID, timestamp, trigger type, matched trigger value, selected row/button metadata when present.

Send Message

Sends a text message, image, or video to the current contact.

FieldDescription
Message typetext, image, or video
TextMessage body or caption
Media URLImage or video URL

Edges: default

May terminate: yes. If it has no outgoing edge, the flow can end here.

Send Interactive

Sends a WhatsApp interactive list, button set, or product-style message. Lists are the most common option for menu flows.

Example list
{
  "sections": [
    {
      "title": "Main menu",
      "rows": [
        { "id": "sales", "title": "Sales" },
        { "id": "support", "title": "Support" }
      ]
    }
  ]
}

Edges: default plus edge rules for selected rows/buttons when configured by the editor.

Parking: yes. Interactive replies can resume routing from this node when the selected row ID belongs to the list.

The current engine does not require a separate Wait node after Send Interactive. A user's list selection can dispatch from the interactive node itself.

Condition

Branches the flow based on text, selected row/button IDs, outcomes, or other context values. Branches are evaluated in order, and the first match wins.

OperatorUse when
equals / not_equalsExact string comparisons
containsThe field includes a substring
starts_with / ends_withPrefix or suffix checks
regexFlexible text matching
is_empty / not_emptyPresence checks

Edges: one edge per branch and one default edge.

Context output: matchedBranch

HTTP Request

Calls an external HTTP API and stores the response.

FieldDescription
MethodGET, POST, PUT, PATCH, or DELETE
URLExternal endpoint
HeadersKey-value header pairs
BodyJSON body string
TimeoutRequest timeout in seconds

Edges: success, error

May terminate: yes.

The executor validates outbound URLs before calling them. Private, loopback, link-local, and otherwise unsafe targets are blocked to reduce SSRF risk.

Delay

Pauses the run for a configured number of seconds.

FieldDescription
DelaySeconds to wait before continuing

Edges: default

Parking: yes.

Go To

Jumps directly to another node by ID. Use it for loops or returning to a menu.

FieldDescription
Target nodeExisting node to continue from

Edges: none. The jump target is stored in node configuration, not represented as an edge.

Validation: publish fails if the target is missing.

Set Variable

Creates or updates named variables from static text or interpolated values.

customerName = {{nodes.user-input.capturedText}}

Edges: default

May terminate: yes.

Variables are referenced later with {{variables.name}}.

User Input

Sends an optional prompt and waits for the contact's next text message.

FieldDescription
PromptMessage sent before waiting
Variable nameStores the reply text in variables
TimeoutSeconds before the timeout outcome

Edges: default, timeout

Parking: yes.

Context output: capturedText, plus the named variable when configured.

Media

Sends an image or video with an optional caption.

FieldDescription
Media typeimage or video
Media URLPublicly reachable media URL
CaptionOptional caption text

Edges: default

May terminate: yes.

LLM

Runs the placeholder LLM step and stores a response. The current executor records the prompt and writes a placeholder response until a model provider is configured.

FieldDescription
PromptPrompt text with interpolation support
ModelModel identifier
Variable nameOptional variable to store the response

Edges: default, error

May terminate: yes.

End

Marks the run as ended. End lives under Advanced in the editor because many action nodes can terminate implicitly.

FieldDescription
Clear contextReserved for terminal cleanup behavior

Edges: none.

Edge summary

NodeEdgesNotes
TriggerdefaultStarts the flow
Send MessagedefaultCan end implicitly
Send InteractivedefaultParks for list/button replies
Conditionbranch IDs, defaultFirst matching branch wins
HTTP Requestsuccess, errorBlocks unsafe URLs
DelaydefaultResumes after timer
Go TononeJumps to configured target
Set VariabledefaultCan end implicitly
User Inputdefault, timeoutCaptures next text reply
MediadefaultCan end implicitly
LLMdefault, errorPlaceholder response today
EndnoneExplicit terminal node

Validation before publish

Publishing calls the shared graph validator from @wp-engine/nodes.

Blocking errors include:

CodeMeaning
NO_TRIGGERThe graph needs exactly one Trigger node
DUPLICATE_IDTwo nodes share the same ID
UNKNOWN_TYPEA node type is not registered
DISCONNECTEDA non-terminal node has no outgoing path
GO_TO_TARGET_MISSINGA Go To node points at a missing node
INVALID_DATAA node is missing required config

Warnings include unreachable nodes and implicit terminal nodes. Warnings help clean up the graph but do not always block publishing.

Common patterns

Simple auto-reply

Trigger -> Send Message
Trigger -> Send Interactive -> Condition
                         sales -> Send Message
                       support -> User Input -> Send Message
                       default -> Send Message

Follow-up loop

Send Message -> Delay -> Go To(target: Send Message)

Use loops carefully. Add an exit condition or timeout path so contacts do not get repeated messages indefinitely.

On this page