Workflows

Your templates run on the production engine: 16 live triggers, 12 actions, true if/else branching, idempotent runs, DLQ retries and a full audit trail.

Wire shape (typed DSL)

"workflowTemplates": [{
  "name": "Hot lead fast-lane",
  "nodes": [
    { "id": "t1", "type": "trigger",   "config": { "eventType": "lead_created" }, "connections": ["c1"] },
    { "id": "c1", "type": "condition", "config": { "field": "score", "operator": ">=", "value": 70 },
      "connections": ["a1"], "elseConnections": ["a2"] },
    { "id": "a1", "type": "create_task",  "config": { "title": "Call {{leadName}}", "priority": "high" }, "connections": [] },
    { "id": "a2", "type": "update_field", "config": { "entityType": "lead", "field": "status", "value": "nurturing" }, "connections": [] }
  ]
}]

Exactly one trigger per workflow; graphs must be acyclic; connections is the true/next path, elseConnections the false path on conditions. {{var}} templates resolve from the event payload.

Trigger catalog

eventTypefires whenpayload highlights
lead_createda lead is created (any source: UI, API, forms, imports, email auto-capture)leadId, leadName, leadEmail, leadCompany, score, status, source
lead_status_changedlead status updates+ oldStatus, newStatus
lead_score_changedscoring engine moves a leadscore
contact_createda contact is born (CRM or the contact-intelligence service)contactId, email, contactName
deal_won / deal_stage_changedopportunity outcomes / stage movesopportunityId, value, stage(s), leadId
form_submitteda public lead-capture form submitsformId, formName, submitted fields, created lead
webhook_receivedan external system POSTs the workflow's secret hook URLthe request body (top-level keys)
scheduledevery intervalMinutes (≥ 5; multi-pod-safe idempotency)scheduledAt
email_replied / email_openeda lead replies to / opens tracked emailleadId, subject
task_completed / task_overduetask lifecycletaskId, title, leadId
meeting_scheduleda new future calendar meeting syncs inmeetingId, startTime, leadId
review_received / review_negativereputation eventsreview payload

Action catalog

typeconfigbehaviour
send_emailto?, subject, messagesends via the tenant's connected mailbox; unconfigured tenants get an explanatory skip, never a fake send
create_tasktitle, description?, priority?, dueInDays?real task, assignee from payload when present
update_fieldentityType (lead|opportunity|task), field, valuestandard columns or the tenant's CUSTOM fields by api-name
create_recordentityType (lead|task|activity|opportunity|custom:<apiName>), fields{}creates records — including into objects your app provisioned
update_lead_status / assign_lead / add_note / move_deal_stagestatus / assignTo / subject+body / stageclassic CRM mutations
call_webhookurl (https), method?, headers?, body?POSTs the payload to your service; SSRF-guarded; non-2xx → DLQ retry
run_agentagentId, instructionsinvokes a Builder agent with the event context
waitminutesdurable pause (survives restarts/deploys)
wait_for_eventeventType, timeoutMinutes?pauses until a matching domain event for the tenant, or the timeout

Reliability semantics