Receive a custom webhook
UseonHttpRequest as the callback for an unsupported webhook:
automations/receive-custom-webhook.automation.ts
rawBody bytes are available on the request signal. Use rawBody for signature verification so parsing doesn’t change the signed content.
Automate.ax omits browser and proxy infrastructure headers from durable request data: cookie, cf-*, sec-*, and x-forwarded-for. You can’t authenticate a custom webhook that requires one of those headers. For example, Cloudflare Notifications sends its authentication secret in cf-webhook-auth, so that webhook isn’t compatible with a custom trigger.
You are responsible for configuring and renewing the provider’s webhook, authenticating requests, validating its payload, and handling provider retries or duplicate events. Automate.ax provides the HTTP endpoint and execution delivery. It doesn’t manage the provider-side subscription for a custom webhook.
Verify webhook signatures
Use the provider’s maintained verification package from thenpm registry when one is available. Install it with Bun, for example:
onePassword.resolveSecret to the verification action. Don’t put a raw secret literal in an action input or return, log, or include the resolved value in an error.
This example verifies a provider that follows the Standard Webhooks specification. Its npm package compares signatures in constant time:
automations/standard-webhook.automation.ts
onHttpRequest({ protection: "callback" }) and generate the URL with runtime.createCallbackUrl(endpoint). This bearer capability prevents callers without the signed URL from reaching that exact trigger. It doesn’t prove the provider’s identity. Validate the provider’s signature as well when you need identity assurance. Protected callback deliveries remain independent root contexts, so correlate a provider job ID to the initiating action instead of relying on the capability for context inheritance.
Use respondToHttpRequest({ requestId: request.requestId, ... }) when the provider requires a verification challenge or synchronous response. This makes the trigger wait automatically. See On HTTP request for the full request shape and response timeout.