Workflows
Workflows are the core operational unit in Ventryx. Define multi-step sequences of automated actions that are triggered by events, schedules, or manual invocation — and run reliably without babysitting.
How workflows work
A workflow consists of a trigger (what starts it) and one or more steps (what happens). Steps execute in sequence by default, but can be configured to run in parallel or branch based on conditions.
Workflow definition
{
"name": "New user onboarding",
"trigger": { "event": "user.registered" },
"steps": [
{ "type": "send_notification", "channel": "email", "template": "welcome" },
{ "type": "create_record", "resource": "crm_contact", "data": "{{event.data}}" },
{ "type": "assign_task", "assignee": "[email protected]", "title": "Review new signup" }
]
}
Step types
| Step type | Description |
|---|---|
send_notification | Email, Slack, SMS, or webhook delivery |
require_approval | Pause and wait for human sign-off |
http_request | Call any external HTTP endpoint |
emit_event | Publish a new event into the platform |
assign_task | Create and assign a task to a team member |
wait | Pause for a fixed duration or until a condition |
branch | Fork execution based on a condition |
create_record | Write to an integrated data system (CRM, DB, etc.) |
Triggering workflows
| Trigger type | Example |
|---|---|
| Platform event | user.registered, order.placed |
| Schedule (cron) | Every day at 09:00, every Monday |
| Webhook | GitHub PR merge, Stripe invoice paid |
| Manual (API/CLI) | POST /v1/workflows/:id/run |
| Another workflow | Chain workflows by emitting events between them |
Run history and retries
Every workflow run is logged with its status, step-level execution timeline, and input/output data. Failed runs can be retried manually from the dashboard or automatically using the retry policy on the workflow definition.
List runs for a workflow
GET /v1/workflows/wf_01HXYZ/runs?status=failed&limit=20