Enviar WhatsApp icon

Enviar WhatsApp

Envía un mensaje de WhatsApp desde un agente de chat de Agents Studio.

Enviar WhatsApp

AI-generated

Summary

Sends a WhatsApp message to a customer phone number using a chat agent from Agents Studio, supporting both free-form text and approved HSM templates.

Inputs

  • agent (required) — The chat agent that will send the message. Must be selected from a list of active chat agents.
  • to (required) — Recipient phone number in E.164 format (e.g., +525538808448).
  • message — Free-form text message. Only delivered if the conversation is within WhatsApp's 24-hour window; otherwise, a template is required.
  • templateName — Name of an approved WhatsApp HSM template. Required when sending outside the 24-hour window; if provided, the message field is ignored.
  • variables — Key-value pairs to fill placeholders (e.g., {{firstName}}) in the selected template.
  • options.idempotencyKey — Optional unique key to prevent duplicate messages if a workflow is retried. If empty, a new UUID v4 is generated per execution.

Output shape

A single output item containing the API response JSON for each input item.

The node caches the internal tool ID for the chat agent tool within the workflow static data. Errors are returned as JSON objects in the output if 'Continue on Error' is enabled.

Examples

Example 1: Send a text message within the 24-hour window.

Agent: Chat Agent A, To: +5255123456789, Message: 'Hello, how can we help?'

Example 2: Send a template message outside the 24-hour window.

Agent: Chat Agent B, To: +5255987654321, Template Name: 'order_update', Variables: Name=John, OrderId=12345

Links

Discussion