Skip to main content

WhatsApp Flows API Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that sends data to a WhatsApp Flows API location.
whatsapp_flows_api.png

WhatsApp Flows API

Create a WhatsApp Flows API Destination

  1. 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.

  2. 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.

  3. 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.

    Create Flow

    This endpoint creates a new WhatsApp Flow. Use this endpoint when you need to create new interactive flows, set up new customer engagement experiences, or programmatically create flows from your data.

    • This endpoint accepts multipart/form-data in the request body. Provide form data as JSON with the following fields:

      • name: The name of the flow
      • categories: An array of category strings (e.g., ["SURVEY", "APPOINTMENT_BOOKING"])
      • endpoint_uri: The endpoint URI for handling flow responses
    • The endpoint will return the created flow ID, which you can use for subsequent operations like updating flow JSON or publishing the flow.

    The Create Flow endpoint uses POST method with multipart/form-data content type. Flows must be created before you can upload flow JSON or publish them. For more information about creating flows, refer to the WhatsApp Flows API Reference.

    Update Flow JSON

    This endpoint uploads a flow JSON file with the flow content. Use this endpoint when you need to update the flow definition, modify flow screens, or update interactive components in your flow.

    • Enter the Flow ID in the Flow ID field. This is the unique identifier for the flow you want to update.
    • This endpoint accepts multipart/form-data in the request body. Provide JSON with a file_content field containing the flow JSON as a string. The flow JSON should follow the WhatsApp Flows JSON schema.

    The Update Flow JSON endpoint uses POST method with multipart/form-data content type. The flow JSON must follow the WhatsApp Flows JSON schema. You can only update flows that are in DRAFT status. For more information about flow JSON structure, refer to the WhatsApp Flows API Reference.

    Update Flow Metadata

    This endpoint updates flow metadata including name, categories, and endpoint URI. Use this endpoint when you need to modify flow settings, update categories, or change the endpoint URI for handling flow responses.

    • Enter the Flow ID in the Flow ID field. This is the unique identifier for the flow whose metadata you want to update.
    • This endpoint accepts multipart/form-data in the request body. Provide form data as JSON with the following fields:

      • name: The updated name of the flow
      • categories: An array of updated category strings
      • endpoint_uri: The updated endpoint URI for handling flow responses

    The Update Flow Metadata endpoint uses POST method with multipart/form-data content type. You can update metadata for flows in any status. For more information about updating flow metadata, refer to the WhatsApp Flows API Reference.

    Publish Flow

    This endpoint publishes a WhatsApp Flow, making it available for use. Use this endpoint when you have completed flow development and testing and are ready to make the flow available to users.

    • Enter the Flow ID in the Flow ID field. This is the unique identifier for the flow you want to publish.
    • This endpoint accepts empty JSON ({}) in the request body. The publish operation is irreversible—once published, flows cannot be unpublished.

    Warning: Publishing a flow is an irreversible operation. Once published, flows cannot be unpublished or reverted to draft status. Ensure your flow is fully tested and ready for production use before publishing. For more information about publishing flows, refer to the WhatsApp Flows API Reference.

    Deprecate Flow

    This endpoint deprecates a published flow, marking it as no longer recommended for use. Use this endpoint when you want to retire a published flow or mark it as deprecated while keeping it available for existing users.

    • Enter the Flow ID in the Flow ID field. This is the unique identifier for the flow you want to deprecate.
    • This endpoint accepts empty JSON ({}) in the request body. The deprecation operation is irreversible—once deprecated, flows cannot be undeprecated.

    Warning: Deprecating a flow is an irreversible operation. Once deprecated, flows cannot be undeprecated. Deprecated flows remain available but are marked as no longer recommended. For more information about deprecating flows, refer to the WhatsApp Flows API Reference.

    Delete Flow

    This endpoint deletes a draft flow. Use this endpoint when you want to remove a flow that is still in draft status and is no longer needed.

    • Enter the Flow ID in the Flow ID field. This is the unique identifier for the flow you want to delete.
    • This endpoint accepts empty JSON ({}) in the request body. Only flows in DRAFT status can be deleted—published flows cannot be deleted.

    The Delete Flow endpoint uses DELETE method. Only flows in DRAFT status can be deleted. Published flows must be deprecated first before they can be removed. For more information about deleting flows, refer to the WhatsApp Flows API Reference.

    Send Published Flow by ID

    This endpoint sends a published WhatsApp Flow to a customer. Use this endpoint when you need to send interactive flows to users, deliver customer engagement experiences, or trigger flows as part of your messaging workflows.

    • Enter the Business Phone Number ID in the Business Phone Number ID field. This is the ID for the sender phone number connected to WhatsApp Business API. You can obtain this from the "Get WABA Phone Numbers" data source endpoint.
    • This endpoint accepts JSON data in the request body. The request body should include the flow message structure with recipient information and flow parameters. The message structure should follow the WhatsApp Cloud API message format with interactive flow type.

    The Send Published Flow by ID endpoint uses POST method to send published flows to customers. Flows must be published before they can be sent. The request body should include recipient phone number, flow ID, flow token, and other required parameters. For more information about sending flows, refer to the WhatsApp Flows Sending Guide.

    Send Draft Flow by ID

    This endpoint sends a draft WhatsApp Flow for testing. Use this endpoint when you need to test flows before publishing, preview flows in development, or validate flow functionality.

    • Enter the Business Phone Number ID in the Business Phone Number ID field. This is the ID for the sender phone number.
    • This endpoint accepts JSON data in the request body. The request body should include the flow message structure with recipient information and flow parameters. Draft flows are not shown to users in draft mode—they are for testing purposes only.

    The Send Draft Flow by ID endpoint uses POST method to send draft flows for testing. Draft flows are not visible to end users and are intended for testing and validation purposes only. For more information about sending flows, refer to the WhatsApp Flows Sending Guide.

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

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. 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

  1. 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

  1. 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

Optional
  • 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

Optional
  • 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

  1. 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.