Outcome component’s schema prop inside configurator.tsx via Workflows.OutcomeSchema.*, and they inform the typed variables the workflow editor makes available.
The actual data value returned by handlers (execute, trigger, finish) is a plain JS object whose shape must match the declared schema, not a schema node itself. See Configurator for the full pattern.
These node types share the same names as the Config schema but use the WorkflowOutcomeData* TypeScript prefix. richText() is not available in the outcome schema.
Every outcome data object must be rooted in a struct node.
Use snake_case for outcome schema field keys. Outcome data is serialized and exposed as variables
in the workflow editor, so field keys become the variable names downstream steps see. If you don’t
use snake_case, chain
.title() on the node to provide a readable display name:Composite nodes
OutcomeSchema.struct(fields)
Root of every outcome data object.
OutcomeSchema.array(element)
A list of values of the given node type.
Primitive nodes
| Factory | TypeScript type | Description |
|---|---|---|
OutcomeSchema.string() | WorkflowOutcomeDataStringNode | Free-form text |
OutcomeSchema.number() | WorkflowOutcomeDataNumberNode | Numeric value |
OutcomeSchema.boolean() | WorkflowOutcomeDataBooleanNode | True/false |
OutcomeSchema.stringEnum(values) | WorkflowOutcomeDataStringEnumNode | One value from a fixed list of strings |
richText() is available in the Config schema but not in the Outcome
schema.Date and time nodes
| Factory | TypeScript type | Description |
|---|---|---|
OutcomeSchema.date() | WorkflowOutcomeDataDateNode | Calendar date without time |
OutcomeSchema.timestamp() | WorkflowOutcomeDataTimestampNode | Point in time (date + time + timezone) |
OutcomeSchema.duration() | WorkflowOutcomeDataDurationNode | Length of time |
Contact and identity nodes
| Factory | TypeScript type | Description |
|---|---|---|
OutcomeSchema.emailAddress() | WorkflowOutcomeDataEmailAddressNode | Email address |
OutcomeSchema.phoneNumber() | WorkflowOutcomeDataPhoneNumberNode | Phone number |
OutcomeSchema.personalName() | WorkflowOutcomeDataPersonalNameNode | First and last name |
OutcomeSchema.domain() | WorkflowOutcomeDataDomainNode | Web domain (e.g. attio.com) |
OutcomeSchema.location() | WorkflowOutcomeDataLocationNode | Geographic location |
OutcomeSchema.currency() | WorkflowOutcomeDataCurrencyNode | Monetary value with currency code |
Attio object nodes
| Factory | TypeScript type | Description |
|---|---|---|
OutcomeSchema.attioRecord() | WorkflowOutcomeDataAttioRecord | Reference to an Attio record |
OutcomeSchema.attioObject() | WorkflowOutcomeDataAttioObject | Reference to an Attio object type |
OutcomeSchema.attioList() | WorkflowOutcomeDataAttioList | Reference to an Attio list |
OutcomeSchema.attioActor() | WorkflowOutcomeDataAttioActor | Reference to an Attio actor |
OutcomeSchema.attioAttribute() | WorkflowOutcomeDataAttioAttribute | Reference to an attribute on an Attio object |
OutcomeSchema.attioSelect() | WorkflowOutcomeDataAttioSelect | Select value from an Attio attribute |
OutcomeSchema.attioSequence() | WorkflowOutcomeDataAttioSequence | Reference to an Attio sequence |
OutcomeSchema.attioTask() | WorkflowOutcomeDataAttioTask | Reference to an Attio task |
Example
This example models an action block that sends an email and exposes two variables to downstream steps: the provider’s message ID and the time the email was sent. Step 1: declare the schema in the configurator. Render an<Outcome> component whose schema prop maps field keys to Workflows.OutcomeSchema.* nodes. The workflow editor reads this to build the variable picker for downstream steps; message_id and sent_at become available as typed variables once a workflow run produces this outcome.
configurator.tsx
data object in the return value must be a plain JS object whose keys and value types match the declared schema. The id ties the return value back to the <Outcome> declared above; that is how the workflow engine knows which branch to follow and which variables to populate.
execute.ts
See also
- Configurator: the
Outcomecomponent andWorkflows.OutcomeSchema.*namespace - Config schema: all available schema field types
- Executing a step: step execute handler
- Receiving a trigger event: trigger event handler