> ## 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.

# Send template message

> Send an approved WhatsApp message template to an opted-in recipient.

`sendWhatsAppTemplateMessage` sends a template approved for the connected WhatsApp Business Account. Templates may initiate a conversation or message outside the 24-hour customer-service window.

```ts automations/send-whatsapp-reminder.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { sendWhatsAppTemplateMessage } from "automate.ax/whatsapp"

export default automation("Send WhatsApp reminder", () => {
  onSchedule({ cron: "0 16 * * 1-5" })

  sendWhatsAppTemplateMessage({
    to: "15551234567",
    templateName: "appointment_reminder",
    languageCode: "en_US",
    components: [
      {
        type: "body",
        parameters: [{ type: "text", text: "Tuesday at 10:00 AM" }],
      },
    ],
  })
})
```

Required inputs are `to`, `templateName`, and `languageCode`. Optional `components` supports typed header and body parameters plus quick-reply and URL button parameters. Parameter values can be text, currency, date/time fallbacks, images, videos, or documents. `callbackData` and static `account` are optional.

Returns `{ messageId, recipientId, status? }`. Meta can reject a request when the template, language, components, recipient opt-in, quality status, or account eligibility does not match.
