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

# WhatsApp automation — workflows, AI agents, and campaign sequences

> Automate WhatsApp messaging with HoopAI workflows — chatbots, AI agents, appointment booking, drip sequences, bulk campaigns, and more.

## Overview

WhatsApp combined with HoopAI's automation engine is a powerful combination. You can:

* Instantly reply to inbound WhatsApp messages
* Send appointment reminders and order notifications automatically
* Deploy AI agents that qualify leads and book appointments 24/7
* Run re-engagement campaigns to thousands of contacts
* Build multi-step drip sequences that respect the [24-hour window](/conversations/whatsapp-24hr-window)

All WhatsApp automations live in **Automation > Workflows** and use the same workflow builder as other channels.

## Triggering workflows from WhatsApp messages

### Inbound WhatsApp trigger

To start a workflow when a customer messages you on WhatsApp:

<Steps>
  <Step title="Create a new workflow">
    Go to **Automation > Workflows** and click **Create Workflow**.
  </Step>

  <Step title="Select the trigger">
    Choose **Customer Replied** or **Inbound Message** as the trigger type.
  </Step>

  <Step title="Filter by channel">
    Add a filter to only trigger on **WhatsApp** messages. This prevents the workflow from firing on SMS or email replies.
  </Step>

  <Step title="Optional: filter by keyword">
    Add keyword filters to trigger only on specific messages. For example, trigger only when the message contains "pricing" or "appointment".
  </Step>
</Steps>

### Other triggers that send WhatsApp

You're not limited to inbound message triggers. These events can also send WhatsApp messages as an action:

| Trigger                    | WhatsApp use case                        |
| -------------------------- | ---------------------------------------- |
| **Appointment booked**     | Send confirmation via WhatsApp           |
| **Appointment reminder**   | Send reminder 24 hours and 1 hour before |
| **Form submitted**         | Welcome message via WhatsApp             |
| **Pipeline stage changed** | Notify contact about deal progress       |
| **Invoice sent**           | Send payment link via WhatsApp           |
| **Order status changed**   | Shipping and delivery updates            |
| **Contact tag added**      | Trigger a campaign sequence              |
| **Birthday/date field**    | Send birthday greetings                  |

## Sending WhatsApp messages from workflows

### Template messages (outside 24-hour window)

When sending a WhatsApp message to a contact who hasn't recently messaged you, you **must** use an approved template:

<Steps>
  <Step title="Add a Send WhatsApp action">
    In the workflow builder, add the **Send WhatsApp** action.
  </Step>

  <Step title="Select a template">
    Choose from your approved templates. Only templates with **Approved** status appear.
  </Step>

  <Step title="Map variables">
    Map template variables to contact fields, custom values, or workflow data. For example, map `{{1}}` to the contact's first name.
  </Step>

  <Step title="Set the sending number">
    Select which connected WhatsApp number to send from (if you have multiple).
  </Step>
</Steps>

### Free-form messages (inside 24-hour window)

If the workflow is triggered by an inbound WhatsApp message (meaning the window is open), you can send free-form messages:

* Type any text directly
* Attach images, videos, or documents
* Use personalization variables (contact name, custom fields)
* Include links

<Warning>
  Free-form messages will **fail** if the 24-hour window has closed. Always use template messages for delayed workflow actions (e.g., follow-ups sent hours or days later). See the [24-hour window guide](/conversations/whatsapp-24hr-window) for details.
</Warning>

## WhatsApp-specific workflow actions

| Action                       | Description                                                 |
| ---------------------------- | ----------------------------------------------------------- |
| **Send WhatsApp message**    | Send a template or free-form message via WhatsApp           |
| **Send WhatsApp media**      | Send an image, video, or document                           |
| **Wait for WhatsApp reply**  | Pause the workflow until the contact replies on WhatsApp    |
| **WhatsApp reply condition** | Branch based on what the contact replied (keyword matching) |
| **Assign conversation**      | Route the WhatsApp conversation to a specific team member   |

## Building a WhatsApp chatbot flow

Create an interactive chatbot that guides customers through a menu without any AI:

<Steps>
  <Step title="Trigger on inbound WhatsApp">
    Use the **Customer Replied** trigger filtered to the WhatsApp channel.
  </Step>

  <Step title="Send a welcome message with options">
    Send a message like:

    ```
    Welcome to HoopAI! How can we help you today?

    Reply with a number:
    1️⃣ Product information
    2️⃣ Order status
    3️⃣ Book an appointment
    4️⃣ Speak to an agent
    ```
  </Step>

  <Step title="Wait for reply">
    Add a **Wait for Reply** action with a timeout (e.g., 5 minutes).
  </Step>

  <Step title="Branch by response">
    Use **If/Else** conditions to route based on the customer's reply:

    * Reply contains "1" → send product info
    * Reply contains "2" → ask for order number, look up status
    * Reply contains "3" → send booking link or trigger appointment workflow
    * Reply contains "4" → assign to a human agent
  </Step>

  <Step title="Add fallback">
    If the reply doesn't match any option, send "Sorry, I didn't understand. Please reply with 1, 2, 3, or 4."
  </Step>
</Steps>

## WhatsApp + AI agent setup

HoopAI's Conversation AI can handle WhatsApp conversations automatically:

<Steps>
  <Step title="Enable Conversation AI">
    Navigate to **Settings > Conversation AI** and ensure AI is enabled for your account.
  </Step>

  <Step title="Enable WhatsApp channel">
    In the AI agent settings, enable the **WhatsApp** channel. The AI will respond to inbound WhatsApp messages.
  </Step>

  <Step title="Train the AI">
    Upload your knowledge base, FAQ documents, and business information. The AI uses this to answer customer questions accurately.
  </Step>

  <Step title="Set handoff rules">
    Configure when the AI should hand off to a human agent:

    * Customer explicitly asks for a human
    * AI confidence is below a threshold
    * Conversation involves sensitive topics (billing disputes, complaints)
  </Step>

  <Step title="Test the flow">
    Send test messages to your WhatsApp number and verify the AI responds correctly, stays on topic, and hands off when appropriate.
  </Step>
</Steps>

<Tip>
  The AI agent operates entirely within the 24-hour window since it only responds to inbound messages. It cannot proactively reach out to contacts.
</Tip>

## Common automation recipes

### Auto-reply outside business hours

<Steps>
  <Step title="Trigger on inbound WhatsApp message">
    Use the **Customer Replied** trigger filtered to WhatsApp.
  </Step>

  <Step title="Add a time condition">
    Use an **If/Else** branch to check if the current time is outside business hours (e.g., before 9 AM or after 6 PM, or weekends).
  </Step>

  <Step title="Send auto-reply">
    If outside hours, send:

    ```
    Thanks for reaching out! Our team is available Monday-Friday,
    9 AM - 6 PM EST. We'll get back to you first thing next business day.
    ```
  </Step>

  <Step title="During business hours">
    If during hours, either let the AI agent handle it, or assign the conversation to a team member.
  </Step>
</Steps>

### Lead qualification via WhatsApp

<Steps>
  <Step title="Trigger on new WhatsApp conversation">
    Trigger when a new contact messages you for the first time on WhatsApp.
  </Step>

  <Step title="Ask qualifying questions">
    Send a series of messages asking about their needs, budget, timeline, etc. Use **Wait for Reply** between each question.
  </Step>

  <Step title="Score the lead">
    Based on replies, update the contact's lead score or tag them (e.g., "hot-lead", "cold-lead").
  </Step>

  <Step title="Route based on score">
    * Hot leads → assign to sales rep, send notification
    * Warm leads → add to nurture sequence
    * Cold leads → send helpful resources, add to monthly newsletter
  </Step>
</Steps>

### Appointment booking via WhatsApp

<Steps>
  <Step title="Trigger on keyword">
    Trigger when a WhatsApp message contains "book", "appointment", or "schedule".
  </Step>

  <Step title="Send booking link">
    Reply with your HoopAI calendar booking link:

    ```
    Great! You can book an appointment at a time that works for you:
    {{calendar_link}}
    ```
  </Step>

  <Step title="Confirmation follow-up">
    When the appointment is booked, trigger a separate workflow that sends a WhatsApp confirmation (using a utility template).
  </Step>
</Steps>

### Order notifications via WhatsApp

Use workflow triggers tied to your order management system:

| Event            | Template to send                                          |
| ---------------- | --------------------------------------------------------- |
| Order placed     | "Your order #`{{1}}` has been confirmed"                  |
| Order shipped    | "Your order has shipped. Track it: `{{1}}`"               |
| Out for delivery | "Your order is arriving today!"                           |
| Delivered        | "Your order has been delivered. How was your experience?" |

### Re-engagement campaigns

<Steps>
  <Step title="Build your audience">
    Create a contact segment of customers who haven't purchased or engaged in 30+ days and have opted in to WhatsApp marketing.
  </Step>

  <Step title="Create a marketing template">
    Design a compelling re-engagement template with a special offer and a CTA button. Submit for [template approval](/conversations/whatsapp-templates-advanced).
  </Step>

  <Step title="Build the campaign workflow">
    Create a workflow triggered by segment membership or a manual campaign trigger. Add the **Send WhatsApp** action with your approved template.
  </Step>

  <Step title="Monitor results">
    Track delivery rates, read rates, and conversions in **Settings > WhatsApp > Analytics**.
  </Step>
</Steps>

## WhatsApp drip sequences

Multi-step sequences require careful planning because of the [24-hour window](/conversations/whatsapp-24hr-window):

| Step             | Timing    | Message type required                   |
| ---------------- | --------- | --------------------------------------- |
| Step 1 (initial) | Immediate | Template (business-initiated)           |
| Step 2           | Day 2     | Template (window from Step 1 is closed) |
| Step 3           | Day 5     | Template                                |
| Step 4           | Day 10    | Template                                |

<Warning>
  Every step in a drip sequence that's sent **more than 24 hours** after the last customer reply requires a template message. Each template send opens a new paid conversation. Factor this into your [cost planning](/conversations/whatsapp-pricing).
</Warning>

### Drip sequence best practices

* **Get replies** — design each message to encourage a reply, which opens a free service conversation window
* **Use utility templates** for transactional steps (cheaper than marketing)
* **Limit sequence length** — 3-5 steps is ideal; more than that risks quality drops
* **Include exit conditions** — stop the sequence if the contact converts, unsubscribes, or replies with "stop"
* **Respect frequency** — don't send more than one template per day to the same contact

## Bulk WhatsApp campaigns

Send WhatsApp messages to a large audience at once:

<Steps>
  <Step title="Prepare your contact list">
    Create a segment or smart list of contacts who have:

    * Valid WhatsApp numbers
    * Opted in to receive WhatsApp messages
    * Not been messaged too recently
  </Step>

  <Step title="Select an approved template">
    Only approved marketing or utility templates can be used for bulk sends.
  </Step>

  <Step title="Configure the campaign">
    Set the sending number, map variables, and configure throttling (sending speed).
  </Step>

  <Step title="Send or schedule">
    Send immediately or schedule for a specific date and time.
  </Step>
</Steps>

### Bulk campaign limits

| Factor                | Limit                                                                                                          |
| --------------------- | -------------------------------------------------------------------------------------------------------------- |
| Contacts per 24 hours | Based on your [tier level](/conversations/whatsapp-templates-advanced#template-rate-limits) (250 to unlimited) |
| Recommended throttle  | 50-100 messages per minute to avoid quality issues                                                             |
| Template requirement  | Yes — always required for bulk sends                                                                           |
| Opt-in requirement    | Yes — contacts must have opted in                                                                              |

<Note>
  Sending bulk WhatsApp messages to contacts who haven't opted in will rapidly degrade your quality rating and may result in your number being suspended by Meta.
</Note>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can I use the same workflow for WhatsApp and SMS?">
    Yes. Use **If/Else** conditions to check the contact's preferred channel or whether they have a WhatsApp number. Send WhatsApp to those who do, SMS to those who don't.
  </Accordion>

  <Accordion title="Do workflow delays reset the 24-hour window?">
    No. Workflow delays (wait steps) don't generate any messages, so they don't affect the window. Only an actual inbound message from the contact resets the window.
  </Accordion>

  <Accordion title="Can I send WhatsApp messages from a webhook trigger?">
    Yes. Use an **Inbound Webhook** trigger, then add a WhatsApp send action. This is useful for integrating with external systems (e-commerce platforms, custom apps).
  </Accordion>

  <Accordion title="What happens if a bulk campaign message fails?">
    Failed messages are logged in the campaign report. Common failure reasons include invalid numbers, closed windows (shouldn't happen with templates), or hitting rate limits. You can retry failed contacts.
  </Accordion>

  <Accordion title="Can the AI agent send templates?">
    The AI agent responds within the 24-hour window using free-form messages. It does not send templates. For template-based follow-ups after the AI conversation, use a separate workflow.
  </Accordion>

  <Accordion title="How do I stop a workflow from sending duplicate WhatsApp messages?">
    Use workflow settings to prevent re-enrollment — if a contact is already in the workflow, they won't be added again. Also add conditions to check if a message was already sent recently.
  </Accordion>
</AccordionGroup>
