> ## 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 Automate.ax execution failed

> Run an automation when another Automate.ax execution permanently fails.

`automate.onExecutionFailed` uses the [execution event payload](/reference/integrations/automate/triggers/on-execution-event) with `execution.status: "failed"`, a populated `execution.settledAt`, and normalized `failure`.

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

export default automation("Execution failed", () => {
  const event = automate.onExecutionFailed({ automation: "auto_123" })
  // Notify an owner with the Automate.ax failure code.
})
```

`automation` accepts an imported automation descriptor, exact ID, or unique deployed description. When `account` is omitted, the trigger uses the deploying project's organization. An explicit static Automate.ax binding requires `project:read` and can watch another organization.
