WhatsApp Flows API Destination
WhatsApp Flows API
Create a WhatsApp Flows API Destination
-
Click the + icon on the Nexset that will be sent to the WhatsApp Flows API destination, and select the Send to Destination option from the menu.
-
Select the WhatsApp Flows API connector from the list of available destination connectors. Then, select the credential that will be used to connect to the WhatsApp Flows API organization, and click Next; or, create a new WhatsApp Flows API credential for use in this flow.
-
In Nexla, WhatsApp Flows API destinations can be created using pre-built endpoint templates, which expedite destination setup for common WhatsApp Flows API endpoints. Each template is designed specifically for the corresponding WhatsApp Flows API endpoint, making destination configuration easy and efficient.
• To configure this destination using a template, follow the instructions in Configure Using a Template.WhatsApp Flows API destinations can also be configured manually, allowing you to send data to WhatsApp Flows API endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
• To configure this destination manually, follow the instructions in Configure Manually.
Configure Using a Template
Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common WhatsApp Flows API endpoints. Each template is designed specifically for the corresponding WhatsApp Flows API endpoint, making destination setup easy and efficient.
-
To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.
Configure Manually
WhatsApp Flows API destinations can be manually configured to send data to any valid WhatsApp Flows API endpoint.
Using manual configuration, you can also configure Nexla to automatically send the response received from the WhatsApp Flows API after each call to a new Nexla webhook data source.
API Method
-
To manually configure this destination, select the Advanced tab at the top of the configuration screen.
-
Select the API method that will be used for calls to the WhatsApp Flows API from the Method pulldown menu. The most common methods are:
- POST: For creating or updating resources (most WhatsApp Flows API endpoints use POST)
- DELETE: For deleting resources (used for deleting draft flows)
Data Format
- Select the format in which the Nexset data will be sent to the WhatsApp Flows API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call. Common formats include:
- JSON: For most API endpoints
- multipart/form-data: For endpoints that require file uploads (e.g., Create Flow, Update Flow JSON)
API Endpoint URL
- Enter the URL of the WhatsApp Flows API endpoint to which you want to send the Nexset data in the URL field. This should be the complete URL including the protocol (https://) and any required path parameters. WhatsApp Flows API endpoints typically follow the pattern
https://graph.facebook.com/{api_version}/{resource}, where{api_version}is your API version (e.g.,v18.0) and{resource}is the API resource path.
Ensure the API endpoint URL is correct and accessible with your current credentials. The endpoint URL should use the API version configured in your credential. WhatsApp Flows API requires Bearer token authentication, which is automatically included from your credential. For update operations, include the flow ID in the URL path (e.g., https://graph.facebook.com/v18.0/{flow_id}).
Request Headers
-
If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g.,
header1:value1,header2:value2).You do not need to include any headers already present in the credentials. Common headers like Authorization, Content-Type, and Accept are typically handled automatically by Nexla based on your credential configuration. For WhatsApp Flows API, the Authorization header with Bearer token is automatically included from your credential.
Request Body Template
-
If the API endpoint requires a specific request body format, you can customize how Nexla formats the data before sending it to the WhatsApp Flows API by entering a request body template in the Request Body Template field. The template should use
{message.json}to include the entire record as JSON, or you can specify individual fields using dot notation (e.g.,{message.field_name}).For most WhatsApp Flows API endpoints, the default request body template
{message.json}will work correctly, sending the entire record as JSON. For endpoints that require multipart/form-data (like Create Flow or Update Flow JSON), you may need to customize the template to match the expected format. Refer to the WhatsApp Flows API documentation for the specific format required by each endpoint.
Save & Activate the Destination
- Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new WhatsApp Flows API destination. Nexla will now begin sending data to the configured endpoint according to your data flow schedule.