Workflow
Workflow protocol schemas
Trigger events for workflow automation
Source: packages/spec/src/automation/workflow.zod.ts
import { ConnectorActionRef, CustomScriptAction, EmailAlertAction, FieldUpdateAction, HttpCallAction, PushNotificationAction, WorkflowTriggerType } from '@objectstack/spec/automation';
import type { ConnectorActionRef, CustomScriptAction, EmailAlertAction, FieldUpdateAction, HttpCallAction, PushNotificationAction, WorkflowTriggerType } from '@objectstack/spec/automation';
// Validate data
const result = ConnectorActionRef.parse(data);
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| connectorId | string | ✅ | Target Connector ID (e.g. slack, twilio) |
| actionId | string | ✅ | Target Action ID (e.g. send_message) |
| input | Record<string, any> | ✅ | Input parameters matching the action schema |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| language | Enum<'javascript' | 'typescript' | 'python'> | ✅ | Script language |
| code | string | ✅ | Script code to execute |
| timeout | number | ✅ | Execution timeout in milliseconds |
| context | Record<string, any> | optional | Additional context variables |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| template | string | ✅ | Email template ID/DevName |
| recipients | string[] | ✅ | List of recipient emails or user IDs |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| field | string | ✅ | Field to update |
| value | any | ✅ | Value or Formula to set |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| url | string | ✅ | Target URL |
| method | Enum<'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'> | ✅ | HTTP Method |
| headers | Record<string, string> | optional | HTTP Headers |
| body | string | optional | Request body (JSON or text) |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Action name |
| type | string | ✅ | |
| title | string | ✅ | Notification title |
| body | string | ✅ | Notification body text |
| recipients | string[] | ✅ | User IDs or device tokens |
| data | Record<string, any> | optional | Additional data payload |
| badge | number | optional | Badge count (iOS) |
| sound | string | optional | Notification sound |
| clickAction | string | optional | Action/URL when notification is clicked |
on_create
on_update
on_create_or_update
on_delete
schedule