> ## 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 origin health-check status changed

> Runs when an origin health check changes status.

`cloudflare.onOriginHealthCheckStatusChanged` runs when an origin health check changes status. 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-origin-health-check-status-changed.automation.ts theme={null}
import { automation } from "automate.ax"
import { cloudflare } from "automate.ax/cloudflare"

export default automation("On origin health-check status changed", () => {
  const event = cloudflare.onOriginHealthCheckStatusChanged({
    accountId: "account-id",
  })
  // Update incident state from the Cloudflare origin health alert.
})
```

Optional `filters`, such as `healthCheckId`, narrow the managed policy. 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>
