|
| 1 | +# Automation Design — Workflow Actions Reference |
| 2 | + |
| 3 | +> Auto-derived from `packages/spec/src/automation/workflow.zod.ts`, `approval.zod.ts`, and related schemas. |
| 4 | +> This file is bundled with the skill for offline/external use. |
| 5 | +
|
| 6 | +## Workflow Action Types |
| 7 | + |
| 8 | +| Type | Key Properties | Description | |
| 9 | +|:-----|:---------------|:------------| |
| 10 | +| `field_update` | `field`, `value` | Set a field to a formula-capable value | |
| 11 | +| `email_alert` | `template`, `recipients[]` | Send email notification | |
| 12 | +| `connector_action` | `connectorId`, `actionId`, `input{}` | Invoke pre-built integration | |
| 13 | +| `http_call` | `url`, `method`, `headers`, `body` | Call external HTTP API | |
| 14 | + |
| 15 | +## Workflow Trigger Types |
| 16 | + |
| 17 | +| Trigger | Description | |
| 18 | +|:--------|:------------| |
| 19 | +| `on_create` | Fires when a record is created | |
| 20 | +| `on_update` | Fires when a record is updated | |
| 21 | +| `on_create_or_update` | Fires on create or update | |
| 22 | +| `on_delete` | Fires when a record is deleted | |
| 23 | +| `schedule` | Fires on a cron schedule | |
| 24 | + |
| 25 | +## Approval Process Properties |
| 26 | + |
| 27 | +| Property | Required | Description | |
| 28 | +|:---------|:---------|:------------| |
| 29 | +| `name` | ✅ | Unique identifier (snake_case) | |
| 30 | +| `object` | ✅ | Target object name | |
| 31 | +| `entryCondition` | ✅ | Formula — when to start approval | |
| 32 | +| `steps` | ✅ | Ordered approval steps | |
| 33 | +| `onApproved` | — | Actions when fully approved | |
| 34 | +| `onRejected` | — | Actions when rejected | |
| 35 | +| `onRecalled` | — | Actions when recalled by submitter | |
| 36 | + |
| 37 | +## Approval Step Properties |
| 38 | + |
| 39 | +| Property | Description | |
| 40 | +|:---------|:------------| |
| 41 | +| `assignTo.type` | `field` (record field), `role`, or `user` | |
| 42 | +| `assignTo.value` | Field name, role name, or user ID | |
| 43 | +| `unanimousRequired` | All assignees must approve (default: false) | |
| 44 | +| `escalation.timeout` | Time before escalation (e.g., `"48h"`) | |
| 45 | +| `escalation.action` | `approve`, `reject`, or `reassign` | |
| 46 | + |
| 47 | +## Flow Variable Schema |
| 48 | + |
| 49 | +| Property | Required | Description | |
| 50 | +|:---------|:---------|:------------| |
| 51 | +| `name` | ✅ | Variable name (snake_case) | |
| 52 | +| `type` | ✅ | `text`, `number`, `boolean`, `object`, `list` | |
| 53 | +| `isInput` | — | Exposed as flow input parameter | |
| 54 | +| `isOutput` | — | Exposed as flow output value | |
| 55 | + |
| 56 | +## Flow Node Config (by type) |
| 57 | + |
| 58 | +| Node Type | Key Config Properties | |
| 59 | +|:----------|:---------------------| |
| 60 | +| `decision` | `conditions[]` with `expression` and `targetNodeId` | |
| 61 | +| `assignment` | `assignments[]` with `variable`, `operator`, `value` | |
| 62 | +| `create_record` | `object`, `fieldValues{}` | |
| 63 | +| `update_record` | `object`, `filters`, `fieldValues{}` | |
| 64 | +| `delete_record` | `object`, `filters` | |
| 65 | +| `query_record` | `object`, `filters`, `sortBy`, `limit` | |
| 66 | +| `http_request` | `url`, `method`, `headers`, `body`, `outputVariable` | |
| 67 | +| `script` | `code` (JS/TS), `inputVariables`, `outputVariables` | |
| 68 | +| `screen` | `components[]` (form fields, buttons) | |
| 69 | +| `loop` | `collection`, `iterationVariable` | |
| 70 | +| `wait` | `waitEventConfig` with `type` and `condition` | |
| 71 | +| `subflow` | `flowName`, `inputAssignments`, `outputAssignments` | |
| 72 | + |
| 73 | +## State Machine Properties |
| 74 | + |
| 75 | +| Property | Required | Description | |
| 76 | +|:---------|:---------|:------------| |
| 77 | +| `field` | ✅ | State field name (e.g., `status`) | |
| 78 | +| `states` | ✅ | Map of state name → `{ initial?, final? }` | |
| 79 | +| `transitions` | ✅ | Array of `{ from, to, trigger?, guard?, actions? }` | |
| 80 | + |
| 81 | +## ETL Pipeline Properties |
| 82 | + |
| 83 | +| Property | Description | |
| 84 | +|:---------|:------------| |
| 85 | +| `source` | Input data source config | |
| 86 | +| `transforms` | Array of transformation steps | |
| 87 | +| `destination` | Output target config | |
| 88 | +| `schedule` | Cron expression for recurring runs | |
| 89 | +| `errorHandling` | `skip`, `abort`, or `retry` | |
0 commit comments