> ## 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 monitor notification

> Runs when the selected monitor opens or closes.

`axiom.onMonitorNotification` runs when the selected monitor opens or closes. The payload contains action, monitor identity, query window, value, groups, and matched event.

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

export default automation("On monitor notification", () => {
  const notification = axiom.onMonitorNotification({ monitorId: "monitor-id" })

  notification.transform(({ action, event }) => ({
    expectedAction: "Open or Closed",
    action,
    monitorId: event.monitorId,
    title: event.title,
    value: event.value,
  }))
})
```

Automate.ax manages a custom webhook notifier for this subscription, preserves other notifier IDs, authenticates each delivery, and removes only the managed notifier during cleanup. Optional `account` selects a static project binding.
