Workflows
Visual node-based workflow automation. Users design workflows connecting Event triggers → Actions → Conditions. Workflows execute asynchronously via RabbitMQ, enabling powerful marketing automation sequences that react to contact activity in real time.
When to use this module
- Build automated marketing sequences that run without manual intervention
- Trigger actions when contacts are tagged →
ContactTagAddedevent node - Send WhatsApp messages as automation →
WhatsappTemplateSendaction node - Add wait periods between steps →
Delaynode with days/hours/minutes - Monitor execution history →
POST /workflow/{id}/executions
Workflow CRUD Endpoints
| Method | Route | Auth | Description |
|---|---|---|---|
| POST | /api/v1/Workflow/getall | Paginated workflow list | |
| GET | /api/v1/Workflow/{id} | Get workflow with nodes + edges | |
| POST | /api/v1/Workflow/create | Create a new workflow | |
| PUT | /api/v1/Workflow/{id}/update | Update workflow details | |
| DELETE | /api/v1/Workflow/{id} | Delete workflow | |
| POST | /api/v1/Workflow/import/{id} | Import a shared workflow by ID | |
| POST | /api/v1/Workflow/explore | Browse shared/public workflows |
/api/v1/Workflow/create
Creates a new workflow for the current firm. The workflow starts with no nodes; use the Flow Designer endpoints to add nodes and connections.
Request Body
{
"name": "Welcome Sequence",
"description": "Auto-send welcome template to new contacts",
"industry": "General",
"isActive": true
}Flow Designer Endpoints
PUT /{id}/flow is used for bulk saves; individual node/edge operations use the other endpoints.| Method | Route | Auth | Description |
|---|---|---|---|
| PUT | /api/v1/Workflow/{id}/flow | Bulk update all nodes + status | |
| POST | /api/v1/Workflow/{id}/node | Upsert single node (create or update) | |
| DELETE | /api/v1/Workflow/{id}/node/{nodeId} | Delete a node from the workflow | |
| POST | /api/v1/Workflow/{id}/connection | Add an edge between two nodes | |
| DELETE | /api/v1/Workflow/{id}/connection/{connectionId} | Remove an edge |
Execution History Endpoints
| Method | Route | Auth | Description |
|---|---|---|---|
| POST | /api/v1/Workflow/{id}/executions | Paginated execution list for a workflow | |
| GET | /api/v1/Workflow/execution/{executionId}/detail | Execution detail with per-node results |
Node Types
Event Nodes
Event nodes are the entry points of a workflow. Each workflow must begin with exactly one event node that defines the trigger condition.
| SubType | Trigger |
|---|---|
ContactCreated | New contact added to the firm |
ContactUpdated | Contact record edited |
ContactDeleted | Contact removed from the firm |
ContactTagAdded | A tag was added to a contact |
ContactTagRemoved | A tag was removed from a contact |
WhatsappTemplateDelivered | A WhatsApp template message was delivered |
Action Nodes
Action nodes perform operations such as sending messages, waiting, or terminating the workflow.
| SubType | What It Does |
|---|---|
WhatsappTemplateSend | Send a WhatsApp template message to the contact |
WhatsappMessageSend | Send a custom WhatsApp message |
Delay | Pause execution for N days / hours / minutes |
End | Terminate the workflow execution |
Condition Nodes
Condition nodes evaluate expressions and route execution down True or False branches.
| SubType | How It Works |
|---|---|
Filter | Evaluate contact field or tag → follow True or False edge |
Node Configuration Examples
Each node stores its config as JSONB in the Configuration property.
{ "days": 1, "hours": 0, "minutes": 0 }{ "field": "tag", "operator": "equals", "value": "VIP" }{ "templateId": "guid-of-template" }Edge SourceHandle Values
| SourceHandle | Meaning |
|---|---|
"Next" | Default sequential flow from any node |
"True" | Condition branch when filter evaluates to true |
"False" | Condition branch when filter evaluates to false |
"{button-guid}" | WhatsApp button reply branch — ID of the button tapped |
Execution Engine Flow
Workflows execute asynchronously via RabbitMQ. Each node execution is tracked individually with full I/O data.
