> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tedro.io/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Templates

> Create, submit for approval, and manage WhatsApp message templates for outbound messaging in Tedro.

# WhatsApp Templates

WhatsApp message templates are pre-approved message formats required for sending outbound messages outside the 24-hour customer service window. Templates must be submitted to Meta for approval before use. Once approved, use them in broadcasts, workflow nodes, and proactive outreach.

<Warning>
  **Meta requires template approval.** You cannot send outbound WhatsApp messages without an approved template when outside the 24-hour window since the customer's last message. This is a WhatsApp Business API policy, not a Tedro limitation.
</Warning>

## Prerequisites

* A Tedro workspace with **Admin** role
* A connected WhatsApp channel
* Access to Meta Business Suite for template management

## Understanding the 24-Hour Window

WhatsApp enforces a **customer service window**:

| Scenario                                           | What You Can Send                                                   |
| -------------------------------------------------- | ------------------------------------------------------------------- |
| **Within 24 hours** of the customer's last message | Free-form messages (any text, media, buttons) via `wa.send_message` |
| **Outside 24 hours**                               | Only pre-approved templates via `wa.send_template`                  |

When the 24-hour window expires, the only way to message a contact is through an approved template. This is why templates are essential for broadcasts, follow-ups, and re-engagement.

## Create a Template

<Steps>
  ### Open Template Management

  Navigate to **Outbound > Templates** in the sidebar. Click **Create Template**.

  ### Choose a Category

  Select the template category as required by Meta:

  | Category           | Use Case                                             |
  | ------------------ | ---------------------------------------------------- |
  | **Marketing**      | Promotions, offers, product announcements            |
  | **Utility**        | Order updates, appointment reminders, account alerts |
  | **Authentication** | One-time passwords, verification codes               |

  <Note>
    Meta charges different rates per category. Utility templates typically cost less than marketing templates.
  </Note>

  ### Compose the Template

  Enter the template content:

  * **Header** (optional) -- Text, image, video, or document
  * **Body** (required) -- The main message text. Use `{{1}}`, `{{2}}`, etc. as placeholders for dynamic values
  * **Footer** (optional) -- Small text below the body (e.g., "Reply STOP to unsubscribe")
  * **Buttons** (optional) -- Call-to-action or quick-reply buttons (up to 3)

  Example body with parameters:

  ```
  Hi {{1}}, your order {{2}} has been shipped! Expected delivery: {{3}}.
  ```

  ### Select Language

  Choose the language for the template. You can create the same template in multiple languages for different audience segments.

  ### Submit for Approval

  Click **Submit**. The template is sent to Meta for review. Approval typically takes minutes to a few hours, though some templates may take up to 24 hours.
</Steps>

## Template Status

| Status       | Meaning                                                                   |
| ------------ | ------------------------------------------------------------------------- |
| **Pending**  | Submitted to Meta, awaiting review                                        |
| **Approved** | Ready to use in broadcasts and workflow nodes                             |
| **Rejected** | Meta declined the template. Review the rejection reason and edit/resubmit |

<Tip>
  If a template is rejected, check Meta's [template guidelines](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/) for common rejection reasons: misleading content, missing opt-out language, or policy violations.
</Tip>

## Using Templates

Approved templates can be used in two places:

1. **Broadcasts** -- Select a template when creating a WhatsApp broadcast. Template parameters are filled with contact data or custom values. See [Broadcasts and Campaigns](/outbound/broadcasts-campaigns).

2. **Workflow nodes** -- Use the `wa.send_template` node to send templates programmatically. Configure the template name, language, and parameter mappings in the node settings. See the [WhatsApp Nodes](/nodes/whatsapp-nodes) reference.

## Template Parameters

Parameters are dynamic placeholders that get replaced with actual values when the template is sent:

| Parameter | Example Value | Source                            |
| --------- | ------------- | --------------------------------- |
| `{{1}}`   | "Sarah"       | Contact name                      |
| `{{2}}`   | "ORD-12345"   | Custom field or workflow variable |
| `{{3}}`   | "March 15"    | Computed value                    |

In workflow nodes, map parameters using context variables like `{{contact.name}}` or `{{conversation.fields.order_id}}`.

## Opt-Out Handling

WhatsApp requires that marketing templates include a way for contacts to opt out. When a contact replies with STOP, UNSUBSCRIBE, or similar keywords:

* Tedro automatically sets `opted_out = true` on the contact record
* Future broadcasts and template sends are blocked for that contact
* The opt-out is logged in the contact's activity timeline

## What's Next

<CardGroup cols={2}>
  <Card title="Broadcasts and Campaigns" icon="megaphone" href="/outbound/broadcasts-campaigns">
    Send approved templates to contact groups with scheduling and analytics.
  </Card>

  <Card title="WhatsApp Nodes" icon="message-square" href="/nodes/whatsapp-nodes">
    Use wa.send\_template in your automation workflows.
  </Card>
</CardGroup>
