> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/workflows/workflow-nodes/message-sending-node.md).

# Message Sending Node

The **Message Sending** node sends outbound WhatsApp or Instagram messages from a Workflow.

Use it to notify a user, reply privately to an Instagram comment, or send an Instagram direct message.

***

### 🛠️ How It Works

When the Workflow reaches this node, Zaia sends a message through the selected connection.

You choose a **connection**. The connection type determines the available fields and send modes.

***

### 📲 Supported Connection Types

#### WhatsApp (Official)

Official WhatsApp connections support:

* **Text**
* **Template**
* **Text with template fallback**

#### WhatsApp (Waha)

Waha connections support **text only**.

Templates and template fallback are not available on Waha.

#### Instagram

Instagram connections support **text only**.

The destination is an Instagram ID, not a phone number. Choose one destination type:

* **Comment** — sends a private reply using an Instagram comment ID.
* **User** — sends a direct message using an Instagram scoped user ID.

***

### ⚙️ Send Modes

#### Text

Zaia sends a regular message.

Use this mode when the recipient is already inside an active 24-hour WhatsApp window.

#### Template

Zaia sends an approved WhatsApp template directly.

Use this mode when you need to start a conversation or send a pre-approved message outside the 24-hour window.

#### Text with template fallback

Zaia tries to send a regular message first.

If WhatsApp rejects the message because the 24-hour window expired, Zaia sends the configured template instead.

> ⚠️ The fallback only runs for the specific WhatsApp window-expired error. Other delivery errors do not trigger template fallback.

***

### 📍 Instagram destination

When you select an Instagram connection, Zaia hides the phone number field and sets the send mode to **Text**.

Select the destination type and provide its matching ID:

* For **Comment**, provide the comment ID.
* For **User**, provide the Instagram scoped user ID.

The destination ID can include Workflow variables. Zaia resolves them when the Workflow runs.

Instagram does not support templates or template fallback in this node.

***

### 🧩 Template Configuration

When the selected connection is **WhatsApp (Official)**, Zaia loads only templates that are:

* Approved in Meta
* Available for that connection
* Valid for the linked WhatsApp account

Zaia builds the template fields dynamically from Meta's template schema. This includes:

* **Body** variables
* **Header** variables

#### Required fields in Workflows

In the Workflow node, all required template fields must be filled before you save the configuration.

This ensures the node is ready to execute without missing data.

***

### 🖼️ Image headers

Templates with an image header accept:

* A public URL
* A stored file
* A data URL

Before sending, Zaia converts the image into the format accepted by the WhatsApp API.

***

### ✅ Validations

Zaia validates the selected connection before sending.

The connection must exist, belong to the current workspace, and be active.

For Instagram, Zaia also requires:

* A configured Instagram account and token.
* A destination type.
* A destination ID.
* **Text** send mode.

If a required value is missing, Zaia stops the Workflow before sending.

Zaia also validates WhatsApp template data before sending.

This includes size and format limits for fields such as:

* Body text
* Header text
* OTP values
* Button URL suffixes

If the data exceeds Meta's limits, the node blocks the send until the values are fixed.

***

### 🔒 Restrictions

* Templates only work with active and correctly configured **WhatsApp (Official)** connections.
* The selected template must exist and be approved in Meta.
* If the template cannot be resolved or validated, the message is blocked.
* Waha connections cannot send templates.
* Instagram messages require an active Instagram connection.
* Instagram messages do not use phone numbers, templates, or template fallback.

***

### 📌 Example Use Cases

* Send a reminder after a payment event.
* Trigger an approved reactivation template after the 24-hour window closes.
* Send a private Instagram reply after receiving a comment.

***

### ✅ Key Takeaway

Use the **Message Sending** node when your Workflow must deliver a message directly.

WhatsApp uses phone numbers. Instagram uses a comment ID or scoped user ID. Instagram sends text only.
