> ## 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 WhatsApp message played

> Start an automation when a recipient plays a WhatsApp audio message.

`onWhatsAppMessagePlayed` starts an automation when WhatsApp reports that a recipient played an audio message.

```ts automations/track-whatsapp-audio.automation.ts theme={null}
import { automation } from "automate.ax"
import { onWhatsAppMessagePlayed } from "automate.ax/whatsapp"

export default automation("Track WhatsApp audio", () => {
  const event = onWhatsAppMessagePlayed()
  event.messageId
})
```

Optional static `account` defaults to the project's WhatsApp binding. The signal has `status: "played"` and includes the message and recipient IDs, timestamp, callback data, conversation, pricing, structured errors, and `providerEvent` described by [the broad status trigger](/reference/integrations/whatsapp/triggers/on-message-status-event).

WhatsApp emits this status for supported audio messages; other message types do not produce a played event.
