Where events live
Event handlers go in a{provider}.events.s1.partial.yaml partial, referenced from the connector’s events block rather than the top-level actions. See File structure for the layout.
The events block
Theevents block has four parts, from provisioning a receiver to handling a delivery:
setupruns the webhook receiver lifecycle with the provider (create, activate, and delete the receiver).externalAccountIdExtractorresolves which linked account an incoming event belongs to.routermaps each incoming payload to an event action.actions[]hold theactionType: eventhandlers that process the matched event.
Anatomy of an event
Each event is an action withactionType: event. It names the provider’s native events, maps the incoming webhook payload to its inputs, and emits a normalized event with the emit_event step function:
Registering the receiver
When the provider has a webhook API, provision the receiver programmatically in theevents.setup block. StackOne runs its phases against the provider: creation (required) when events are enabled on a Connector Profile, deletion (required) when they are removed, and an optional activation step in between. Each phase is a list of ordinary request steps.
StackOne threads two values through these steps:
${inputs.callbackUrl}— the StackOne receiver URL the provider should post events to. Map it into the create request.${inputs.remoteId}— the id of the webhook the provider created, read fromcreation.result.activationanddeletionreference it to target that webhook.
setup out and register manually with a Native Webhook URL.
Native Webhook URL
When a provider is configured manually, expose a Native Webhook URL on the connector profile by adding a field to your authentication config:events.guides.setup.
Related
Events reference
Every field of the events block, with examples.