Skip to main content
The config schema declares the fields that configurator.tsx must render inputs for. It is declared in block.ts via the configSchema field of Workflows.defineWorkflowBlock, and is the source of truth for the typed config argument your handlers receive. Every schema must be rooted in a struct node. Node types are accessed via Workflows.ConfigSchema.

Composite nodes

FactoryDescription
ConfigSchema.struct(fields)Root of every config schema. Each key is a field name; each value is a node. All handler config arguments are typed from the struct at the schema root.
ConfigSchema.array(element)A repeating list of values of the given node type. The config property is typed as an array of the element’s TypeScript type.

Primitive nodes

FactoryTypeScript typeDescription
ConfigSchema.string()WorkflowBlockConfigStringNodeFree-form text
ConfigSchema.number()WorkflowBlockConfigNumberNodeNumeric value
ConfigSchema.boolean()WorkflowBlockConfigBooleanNodeTrue/false toggle
ConfigSchema.stringEnum(values)WorkflowBlockConfigStringEnumNodeOne value from a fixed list of strings
ConfigSchema.richText()WorkflowBlockConfigRichTextNodeFormatted text (not available in Outcome schema)

Date and time nodes

FactoryTypeScript typeDescription
ConfigSchema.date()WorkflowBlockConfigDateNodeCalendar date without time
ConfigSchema.timestamp()WorkflowBlockConfigTimestampNodePoint in time (date + time + timezone)
ConfigSchema.duration()WorkflowBlockConfigDurationLength of time

Contact and identity nodes

FactoryTypeScript typeDescription
ConfigSchema.emailAddress()WorkflowBlockConfigEmailAddressEmail address
ConfigSchema.phoneNumber()WorkflowBlockConfigPhoneNumberPhone number
ConfigSchema.personalName()WorkflowBlockConfigPersonalNameNodeFirst and last name
ConfigSchema.domain()WorkflowBlockConfigDomainWeb domain (e.g. attio.com)
ConfigSchema.location()WorkflowBlockConfigLocationGeographic location
ConfigSchema.currency()WorkflowBlockConfigCurrencyMonetary value with currency code

Attio object nodes

FactoryTypeScript typeDescription
ConfigSchema.attioRecord()WorkflowBlockConfigAttioRecordReference to an Attio record
ConfigSchema.attioObject()WorkflowBlockConfigAttioObjectReference to an Attio object type
ConfigSchema.attioList()WorkflowBlockConfigAttioListReference to an Attio list
ConfigSchema.attioActor()WorkflowBlockConfigAttioActorReference to an Attio actor (user or workspace member)
ConfigSchema.attioAttribute()WorkflowBlockConfigAttioAttributeReference to an attribute on an Attio object
ConfigSchema.attioSelect()WorkflowBlockConfigAttioSelectSelect value from an Attio attribute
ConfigSchema.attioSequence()WorkflowBlockConfigAttioSequenceReference to an Attio sequence
ConfigSchema.attioTask()WorkflowBlockConfigAttioTaskReference to an Attio task

Example

block.ts
import {Workflows} from "attio"

export default Workflows.defineWorkflowBlock({
  type: "step",
  id: "send-email",
  title: "Send email",
  description: "Send an email to a contact.",
  configSchema: Workflows.ConfigSchema.struct({
    recipient: Workflows.ConfigSchema.emailAddress(),
    subject: Workflows.ConfigSchema.string(),
    body: Workflows.ConfigSchema.richText(),
    send_at: Workflows.ConfigSchema.timestamp(),
  }),
})

See also