Skip to main content
defineWorkflowBlockActivate wires an activate handler to a trigger block. The handler runs once when a workflow that uses this trigger is enabled. Typical work here: register a webhook with the upstream service so events flow back to Attio via metadata.triggerCallbackUrl.

Parameters

WorkflowBlock
required
The block returned by defineWorkflowBlock in block.ts.
function
required
The handler function. Receives a context object with config (typed from the block’s configSchema) and metadata.metadata provides workflow identity and the callback URL to register with the upstream service:

Example

activate.ts

See also