Flowmaker Visual Automation API
Inspect, create, update, validate, toggle, duplicate, and manage multi-step WhatsApp visual flows programmatically. Build rich automation graphs with trigger events, interactive reply buttons, Meta utility templates, conditional branching, AI agents, CRM actions, and staff notification alerts without touching UI.
Authentication & Scope: All requests use Sanctum Bearer tokens and JSON payloads against https://app.wacm.in/api/v1/flowmaker. All operations are tenant-scoped, verified for structural integrity before activation, and support instant draft versus live publish separation.
Flowmaker API & Graph Specs for AI Assistants and Developers
LLM ReadyFeed WACM API specs directly to Cursor, Claude, ChatGPT, Antigravity, or custom AI agents.
Flowmaker Endpoints
/flowsList conversational flows in this workspace. Supports search, active (1/0), page, and limit filters. Returns node/edge summary metrics.
/flows/{id}Read complete flow definition (or /flows/show?flow_id={id}) including nodes, edges, trigger settings, and published draft status.
/flowsCreate a new visual flow with name, active state, and initial graph nodes and edges. Runs structural validation before persisting.
/flows/{id}Update flow graph structure (nodes & edges), name, or published status. Set publish: true to publish live immediately.
/flows/{id}/toggle-activeActivate or pause a conversational flow. Enforces pre-flight structural checks to prevent orphan triggers or broken links.
/flows/{id}/duplicateClone an existing conversational flow as an inactive copy for safe testing.
/flows/{id}/discard-draftDiscard unpublished draft graph changes and revert to the live published version.
/flows/{id}Safely delete a flow and unlink connected triggers and reply listeners.
/flows/validateValidate graph structure (orphan nodes, disconnected branches, handle mismatches, missing settings) without saving.
/node-typesRetrieve full catalog of 40+ supported node types with complete settings_schema, incoming/outgoing handles, runtime variables, and routing rules.
/flows/ai-generateGenerate an optimized flow graph with nodes and edges from a natural-language business prompt.
/historyQuery paginated step-by-step execution logs for debugging. Filters: flow_id, contact_id, status, limit.
/historyClear execution history logs, optionally filtered by flow_id, contact_id, or before_date.
Graph Schema: Nodes & Edges
Flowmaker graphs follow standard React Flow topology. A valid flow requires at least one starter trigger on the left (e.g. keyword_trigger, order_created, or incoming_message) connected sequentially to action nodes via directed edges.
{
"id": "node_template_cod",
"type": "template",
"position": { "x": 650, "y": 150 },
"data": {
"label": "Send COD Template",
"settings": {
"selectedTemplateId": 142,
"parameters": {
"BODY_1": "{{order_customer_name}}",
"BODY_2": "{{order_order_number}}",
"BODY_3": "{{order_total_amount}}",
"BODY_4": "{{order_payment_method}}",
"BODY_5": "{{order_items_text}}",
"BODY_6": "{{order_customer_address}}",
"BODY_7": "{{order_customer_phone}}"
}
}
}
}{
"id": "e_cod_confirm_to_tag",
"source": "node_template_cod",
"target": "node_tag_confirmed",
"sourceHandle": "quick-reply-0",
"targetHandle": null
}Critical Edge Handle Matching Rules
When connecting nodes, the edge's sourceHandle string must strictly conform to backend execution routing:
| Node Type | Source Handle Name | Settings Schema Keys | Execution Behavior |
|---|---|---|---|
buttons / quick_replies | button-1, button-2, button-3 | body, activeButtons (1-3), button1, button2, button3 | 1-indexed! Matches customer tapping button 1, 2, or 3. Settings key is body (not message). |
template | quick-reply-0, quick-reply-1, quick-reply-2, always | selectedTemplateId, parameters | 0-indexed! quick-reply-0 routes 1st button tap. Handle always continues immediately (ideal for reminder timers). |
branch | "true", "false" | conditions: [{"variable", "operator", "value"}], logicType: "and"|"or" | Evaluates variables with 11 operators (equals, contains, regex, etc.). Routes along "true" or "false". |
send_ext_message | always | phone (with country code), message | Sends external alert to staff/operations phone (e.g. 919662775074). Outgoing handle is always. |
question | always (or valid / invalid) | question, variable, validation (optional) | Pauses flow, collects customer answer into named state variable, then resumes downstream. |
followup / delay | always | delay_minutes or delay_hours | Pauses execution branch for configured time before sending follow-up or reminder message. |
end | — | {} | Cleanly terminates branch execution and flushes temporary flow state. |
Webhook Runtime Variables
When flows trigger from webhooks (such as Shopify, WooCommerce, or WACM Shop), context data is automatically injected into state variables prefixed with the event scope:
| Variable Name | Description | Example Injected Value |
|---|---|---|
| {{order_order_id}} | Internal store order identifier | 1042 |
| {{order_order_number}} | Customer-facing order number | #1042 |
| {{order_total_amount}} | Total order amount | 1299.00 |
| {{order_payment_method}} | Payment gateway / payment method | Cash on Delivery (COD) |
| {{order_customer_name}} | Recipient full customer name | Priya Sharma |
| {{order_customer_phone}} | Customer phone number with country code | 919876543210 |
| {{order_customer_address}} | Full multi-line shipping address | Flat 402, Lotus Apt, Surat, Gujarat 395007 |
| {{order_items_text}} | Formatted items summary string | 1x Embroidered Kurti (M) |
| {{contact_last_message}} | Customer's latest message or button click label | Confirm Order |
Creating a Flow via API
Submit a POST /api/v1/flowmaker/flows request with your complete node and edge layout:
{
"name": "Order Confirmation (COD & Prepaid)",
"active": true,
"nodes": [
{
"id": "node_trigger",
"type": "order_created",
"position": { "x": 100, "y": 200 },
"data": { "label": "Order Created Event" }
},
{
"id": "node_branch_payment",
"type": "branch",
"position": { "x": 350, "y": 200 },
"data": {
"label": "Is COD Order?",
"settings": {
"conditions": [
{ "variable": "order_payment_method", "operator": "contains", "value": "COD" }
],
"logicType": "and"
}
}
},
{
"id": "node_template_cod",
"type": "template",
"position": { "x": 650, "y": 100 },
"data": {
"label": "Send COD Template",
"settings": {
"selectedTemplateId": 142,
"parameters": {
"BODY_1": "{{order_customer_name}}",
"BODY_2": "{{order_order_number}}",
"BODY_3": "{{order_total_amount}}",
"BODY_4": "{{order_customer_address}}"
}
}
}
},
{
"id": "node_template_prepaid",
"type": "template",
"position": { "x": 650, "y": 350 },
"data": {
"label": "Send Prepaid Template",
"settings": {
"selectedTemplateId": 143,
"parameters": {
"BODY_1": "{{order_customer_name}}",
"BODY_2": "{{order_order_number}}",
"BODY_3": "{{order_total_amount}}"
}
}
}
}
],
"edges": [
{
"id": "e_trigger_to_branch",
"source": "node_trigger",
"target": "node_branch_payment"
},
{
"id": "e_branch_to_cod",
"source": "node_branch_payment",
"target": "node_template_cod",
"sourceHandle": "true"
},
{
"id": "e_branch_to_prepaid",
"source": "node_branch_payment",
"target": "node_template_prepaid",
"sourceHandle": "false"
}
]
}