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
The block returned by
defineWorkflowBlock in block.ts.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
- Receiving a trigger event: trigger event handler
- Deactivating a trigger: trigger deactivate handler
- File structure: complete folder layout for trigger and step blocks