# WhatsApp

Send WhatsApp messages

[WhatsApp](https://www.whatsapp.com/) is a globally popular messaging platform that enables secure, reliable communication between individuals and businesses.

WhatsApp Business API provides organizations with powerful capabilities to:

* **Engage customers**: Send personalized messages, notifications, and updates directly to customers' preferred messaging app
* **Automate conversations**: Create interactive chatbots and automated response systems for common inquiries
* **Enhance support**: Provide real-time customer service through a familiar interface with rich media support
* **Drive conversions**: Facilitate transactions and follow-ups with customers in a secure, compliant environment

In SteelEngine, the WhatsApp integration enables your agents to leverage these messaging capabilities as part of their workflows. This creates opportunities for sophisticated customer engagement scenarios like appointment reminders, verification codes, alerts, and interactive conversations. The integration bridges the gap between your AI workflows and customer communication channels, allowing your agents to deliver timely, relevant information directly to users' mobile devices. By connecting SteelEngine with WhatsApp, you can build intelligent agents that engage customers through their preferred messaging platform, enhancing user experience while automating routine messaging tasks.

## Usage Instructions

Integrate WhatsApp into the workflow. Can send messages.

## Tools

### `whatsapp_send_message`

Send WhatsApp messages

#### Input

| Parameter       | Type   | Required | Description                                                   |
| --------------- | ------ | -------- | ------------------------------------------------------------- |
| `phoneNumber`   | string | Yes      | Recipient phone number with country code (e.g., +14155552671) |
| `message`       | string | Yes      | Message content to send (plain text or template content)      |
| `phoneNumberId` | string | Yes      | WhatsApp Business Phone Number ID (from Meta Business Suite)  |

#### Output

| Parameter     | Type    | Description                          |
| ------------- | ------- | ------------------------------------ |
| `success`     | boolean | WhatsApp message send success status |
| `messageId`   | string  | Unique WhatsApp message identifier   |
| `phoneNumber` | string  | Recipient phone number               |
| `status`      | string  | Message delivery status              |
| `timestamp`   | string  | Message send timestamp               |

## Triggers

A workflow can start when one of these WhatsApp events occurs.

### WhatsApp Webhook

Trigger workflow from WhatsApp messages and events via Business Platform webhooks

WhatsApp sends the event to the webhook URL shown in the block.

#### Configuration

| Field              | Type | Description                                                                                                      |
| ------------------ | ---- | ---------------------------------------------------------------------------------------------------------------- |
| Verification Token | text | Enter any secure token here. You'll need to provide the same token in your WhatsApp Business Platform dashboard. |
| App Secret         | text | App Secret from Meta App Settings > Basic. Used to validate POST signatures on incoming webhooks.                |

#### Output

| Field                | Type   | Description                                                                                              |
| -------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| `eventType`          | string | Webhook classification such as incoming\_message, message\_status, or mixed                              |
| `messageId`          | string | First WhatsApp message identifier (wamid) found in the webhook batch                                     |
| `from`               | string | Sender phone number from the first incoming message in the batch                                         |
| `recipientId`        | string | Recipient phone number from the first status update in the batch                                         |
| `phoneNumberId`      | string | Business phone number ID from the first message or status item in the batch                              |
| `displayPhoneNumber` | string | Business display phone number from the first message or status item in the batch                         |
| `text`               | string | Text body from the first incoming text message in the batch                                              |
| `timestamp`          | string | Timestamp from the first message or status item in the batch                                             |
| `messageType`        | string | Type of the first incoming message in the batch (text, image, system, etc.)                              |
| `status`             | string | First outgoing message status in the batch, such as sent, delivered, read, or failed                     |
| `contact`            | json   | First sender contact in the batch (wa\_id, profile.name)                                                 |
| `webhookContacts`    | json   | All sender contact profiles from the webhook batch                                                       |
| `messages`           | json   | All incoming message objects from the webhook batch, flattened across entries/changes                    |
| `statuses`           | json   | All message status objects from the webhook batch, flattened across entries/changes                      |
| `conversation`       | json   | Conversation metadata from the first status update in the batch (id, expiration\_timestamp, origin.type) |
| `pricing`            | json   | Pricing metadata from the first status update in the batch (billable, pricing\_model, category)          |
| `raw`                | json   | Complete structured webhook payload from WhatsApp                                                        |
