Skip to main content
Events let your connector turn a provider’s webhooks into normalized StackOne events. As a connector author, you declare the events in the connector YAML; StackOne handles subscription, signature verification, and delivery to a webhook. This is the producing side. For how a consumer subscribes and receives events, see Webhook Events; for the concept, see Events.

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

The events block has four parts, from provisioning a receiver to handling a delivery:
  1. setup runs the webhook receiver lifecycle with the provider (create, activate, and delete the receiver).
  2. externalAccountIdExtractor resolves which linked account an incoming event belongs to.
  3. router maps each incoming payload to an event action.
  4. actions[] hold the actionType: event handlers that process the matched event.

Anatomy of an event

Each event is an action with actionType: 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 the events.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 from creation.result. activation and deletion reference it to target that webhook.
If the provider has no webhook API, leave 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:
The user copies this URL into the provider’s own webhook configuration, guided by the steps you define in events.guides.setup.

Events reference

Every field of the events block, with examples.