The WhatsApp component is an application component that allows users to use WhatsApp Business Platform API to send template and messages.
It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component configuration is defined and maintained here.
#Setup
#Supported Tasks
#Send Text Based Template Message
Send text-based template message. This task support header(text), body and button parameters.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Template Name (required) | name | string | Name of the template |
Language Code (required) | language-code | string | The code of the language in which the template is used. Supported languages: https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages |
Header Parameters | header-parameters | array[string] | Specify the parameters for the header section of the template. Leave this blank if there is no parameter. |
Body Parameters | body-parameters | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. |
Button Parameters | button-parameters | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Message Status | message-status | string | The status of the message. |
Send media-based template message. This task support header(image, document & video), body and button parameters.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Template Name (required) | name | string | Name of the template |
Language Code (required) | language-code | string | The code of the language in which the template is used. Supported languages: https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages |
Header Type (required) | media-type | string | Specify the header(media) type for the header section of the template. |
ID Or Link (Header Parameter) (required) | id-or-link | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. |
Filename (Header Parameter) | filename | string | The filename of the document. Only document can use this property. This property will specify what format the document is displayed as in WhatsApp. If other media type tried to use this property, it will be ignored. |
Body Parameters | body-parameters | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. |
Button Parameters | button-parameters | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Message Status | message-status | string | The status of the message. |
#Send Location Based Template Message
Send location-based template message. This task support header(location), body and button parameters.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Template Name (required) | name | string | Name of the template |
Language Code (required) | language-code | string | The code of the language in which the template is used. Supported languages: https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages |
Latitude (Header Parameter) (required) | latitude | number | Location latitude |
Longitude (Header Parameter) (required) | longitude | number | Location longitude |
Location Name (Header Parameter) (required) | location-name | string | Name of the location |
Location Address (Header Parameter) (required) | address | string | Address of the location |
Body Parameters | body-parameters | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. |
Button Parameters | button-parameters | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Message Status | message-status | string | The status of the message. |
#Send Authentication Template Message
Send authentication template message with one-time password button (The button is used to copy the password to clipboard). Authentication template has no header parameters.
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Template Name (required) | name | string | Name of the template |
Language Code (required) | language-code | string | The code of the language in which the template is used. Supported languages: https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages |
One-Time Password (required) | one-time-password | string | One-time password to be sent to the recipient. Maximum 15 characters. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Message Status | message-status | string | The status of the message. |
#Send Text Message
Send text message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_TEXT_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Text (required) | body | string | Body of the message |
Preview URL (required) | preview-url | string | Specify whether URL should be previewed or not. This will have no affect if the message does not contain any URL. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Send media message. Media supported: video, audio, document, image. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_MEDIA_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Media Type (required) | media-type | string | Specify what media to send. |
ID Or Link (required) | id-or-link | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. |
Caption | caption | string | Media asset caption. Description of the media. This property cannot be used when the media type is audio. If audio tried to use this property, it will be ignored. |
Filename | filename | string | The filename of the document. Only document can use this property. This property will specify what format the document is displayed as in WhatsApp. If other media type tried to use this property, it will be ignored. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
#Send Location Message
Send location message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_LOCATION_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Latitude (required) | latitude | number | Location latitude |
Longitude (required) | longitude | number | Location longitude |
Location Name (required) | location-name | string | Name of the location |
Location Address (required) | address | string | Address of the location |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Send contact message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_CONTACT_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
First Name (required) | first-name | string | First name of the contact |
Middle Name | middle-name | string | Middle name of the contact |
Last Name | last-name | string | Last name of the contact |
Phone Number | phone-number | string | Phone number of the contact |
Phone Number Type | phone-number-type | string | Phone number type of the contact. If there is no phone number, pick none. |
Email | email | string | Email of the contact |
Email Type | email-type | string | Email type of the contact. If there is no email, pick none. |
Birthday | birthday | string | Birthday of the contact. Format is in 'YYYY-MM-DD'. |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |
Send interactive Call-To-Action URL button message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE |
Phone Number ID (required) | phone-number-id | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. |
Recipient Phone Number (required) | to | string | The number of the recipient you are sending the message to |
Header Text | header-text | string | Message header text. |
Body Text (required) | body-text | string | Message body text. |
Footer Text | footer-text | string | Message footer text. |
Button Display Text (required) | button-display-text | string | The text displayed on the button |
Button URL (required) | button-url | string | URL to load when the user tapped the button |
Output | ID | Type | Description |
---|
Recipient WhatsApp ID | recipient-wa-id | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. |
Message ID | message-id | string | The ID of the message |