Skip to main content
Webhooks are the escape hatch. The first-party trigger types cover the systems Cosmos has a managed integration for. Anything else — Datadog, CircleCI, self-hosted GitLab, a service you wrote yourself — talks to Cosmos through a custom webhook: an HTTPS endpoint you create, paste into the source system’s outbound-webhook config, and reference from a webhook-typed trigger. The same JSONLogic filter machinery works on a custom webhook’s payload, so the receiving Expert only wakes up for the shapes you whitelist.

Creating a Custom Webhook

A custom webhook can be shared with your organization or kept personal, and can be reused by any number of triggers.
  1. Open Webhooks in the sidebar (under Capabilities in settings).
  2. Create a webhook: pick a type — Bearer Token is the generic choice — give it a description, and choose whether it’s shared or personal.
  3. The confirmation page reveals the Webhook URL and the secret (shown as the Signing Secret) once — copy both before leaving the page. The secret cannot be retrieved later. Send it as a bearer token on every request (see below).
The trigger URL has the form:
The full raw HTTP body is forwarded to Cosmos as the event payload with no wrapping. When you add the Webhook trigger from the Automations page, pick the custom webhook by name from the webhook dropdown — that wires the trigger to the URL you just minted.

Common Webhook Examples

Datadog — Error Alert

  1. Create a webhook and copy the URL + bearer secret.
  2. In Datadog → Integrations → Webhooks, configure a custom webhook with the trigger URL and add Authorization: Bearer <bearer-secret> under Custom Headers.
  3. On the Automations page, add a Webhook trigger, pick the new custom webhook from the Webhook dropdown, and set Filter to match the alerts you care about:

CircleCI — Workflow Failed

  1. Generate a webhook the same way.
  2. In CircleCI → Project Settings → Webhooks, configure a webhook with the trigger URL and add Authorization: Bearer <bearer-secret> under headers.
  3. On the Automations page, add a Webhook trigger pointing at the new custom webhook with Filter:

Test Any Custom Webhook with curl

You can fire a test event into any custom webhook with curl:
Then open the events log, filter by source = Webhook, and confirm the event was received.

See Also