Skip to main content

Workflows API

Endpoints

MethodEndpointDescription
GET/workflowsList workflows (optional ?module filter)
GET/workflows/:idGet workflow with actions
POST/workflowsCreate workflow
PUT/workflows/:idUpdate workflow
PATCH/workflows/:id/toggleEnable/disable workflow
DELETE/workflows/:idDelete workflow
GET/workflows/:id/runs?page=&limit=Run history
GET/workflows/runs/:runIdRun detail with steps

Workflow Object

{
"id": "uuid",
"name": "Auto-assign new leads",
"description": "Round-robin assignment for inbound leads",
"triggerModule": "leads",
"triggerType": "lead_created",
"triggerFilters": {
"logic": "AND",
"conditions": [
{ "field": "source", "operator": "equals", "value": "website" }
]
},
"isActive": true,
"version": 1,
"actions": [
{
"id": "uuid",
"actionType": "assign_owner",
"config": { "algorithm": "round_robin", "userIds": ["uuid1", "uuid2"] },
"sortOrder": 1
}
]
}

Trigger Events

Leads

lead_created, lead_updated, lead_stage_changed, lead_score_changed, lead_converted, lead_assigned

Contacts

contact_created, contact_updated, contact_assigned

Accounts

account_created, account_updated, account_assigned

Opportunities

opportunity_created, opportunity_updated, opportunity_stage_changed, opportunity_won, opportunity_lost, opportunity_assigned

Tasks

task_created, task_updated, task_overdue, task_completed

Projects

project_created, project_updated, project_status_changed, project_task_overdue, project_completed

Action Types

TypeDescription
assign_ownerAuto-assign record owner
create_taskCreate follow-up task
update_fieldUpdate entity field
add_tagAdd tag to record
send_notificationIn-app notification
send_emailSend email
send_whatsappSend WhatsApp via Twilio
send_smsSend SMS via Twilio
webhookCall external API
waitDelay before next action
branchIf/else conditional split
create_opportunityCreate opportunity from lead
create_projectCreate project from opportunity

Condition Operators

equals, not_equals, contains, not_contains, starts_with, is_empty, is_not_empty, greater_than, less_than, greater_or_equal, less_or_equal, in, not_in, changed_to, changed_from, any_change

Variable Interpolation

Use {{trigger.fieldName}} in action configs to reference the trigger entity's fields. Both snake_case and camelCase are supported.