> ## 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 action attempt event

> Run an automation for every logical attempt transition in another Automate.ax automation.

`automate.onActionAttemptEvent` emits for `running`, `retrying`, `succeeded`, `failed`, and `indeterminate` logical attempt transitions.

```ts automations/watch-action-attempts.automation.ts theme={null}
import { automation } from "automate.ax"
import { automate } from "automate.ax/automate"

export default automation("Watch action attempts", () => {
  const event = automate.onActionAttemptEvent({
    account: "operations",
    automation: "auto_123",
  })
  // Route the Automate.ax action attempt by status.
})
```

The payload contains `action`, `attempt`, `execution`, `automation`, `project`, `organization`, `transitionedAt`, and nullable `failure`. Action data includes name, slot, status, replay safety, and maximum attempts. Attempt data includes its one-based logical ordinal, status, start and completion times, and nullable retry time.

`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. The trigger never exposes worker delivery IDs or queue retry data, and it does not deliver to the automation whose action produced the event.
