Send a private message
send_messageSend a private message to a contact via social channels; use approved text within 24h or an approved WhatsApp template with parameters for older conversations.
Instructions
Send a private message to a contact. Two rules that cause most failures: on Facebook, Instagram and WhatsApp a free-form message only reaches someone within 24 hours of their last message, and outside that window WhatsApp needs an approved template: pass template_name and template_language instead of text, and template_parameters with the values of its variables in order ({{1}}, {{2}}...). Show the user what you are about to send and let them approve it first — this goes out under their brand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The message, already approved by the user. Not used with a template. | |
| id_account | Yes | ||
| id_contact | Yes | ||
| template_name | No | An approved WhatsApp template, for messages outside the 24h window. | |
| id_organization | No | The PlanVortex organization id. Optional. | |
| template_language | No | The template's language code, as approved (for example es or en_US). | |
| template_parameters | No | Values for the template's body variables, in order: the first fills {{1}}. No line breaks, tabs or more than four spaces in a row. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| already_existed | Yes |