> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On notification

> Runs for any selected Cloudflare notification alert type.

`cloudflare.onNotification` runs for any selected Cloudflare notification alert type. Automate.ax creates the generic webhook destination and notification policy, verifies `cf-webhook-auth`, and removes managed resources when the deployment no longer subscribes.

```ts automations/cloudflare-on-notification.automation.ts theme={null}
import { automation } from "automate.ax"
import { cloudflare } from "automate.ax/cloudflare"

export default automation("On notification", () => {
  const event = cloudflare.onNotification({
    accountId: "account-id",
    alertTypes: ["health_check_status_notification"],
  })
  // Route the Cloudflare notification by alert type.
})
```

Choose one or more `alertTypes`; optional `filters` use Cloudflare's alert-policy filters. Optional `account` selects a static project account binding. Returns the normalized alert type, provider data, text, timestamp, account and policy IDs, policy name, correlation ID, and alert state when present.

<Warning>
  Cloudflare generic webhooks and individual alert types can require a paid plan
  or enabled product.
</Warning>
