How can we help?

WhatsApp Flows
8 min
Created by Ligia Sarmento on 1/17/2024 12:02 PM
Updated by Maria Malheiro on 11/23/2026 5:48 PM
Important: WhatsApp Flows are only available for NLU Enterprise accounts and Zenvia Customer Cloud accounts with interoperability enabled. If your account does not meet these requirements, this feature will not be visible on the platform.

WhatsApp Flows are designed to create smoother, more connected interactions on the platform, allowing users to share content and interact more seamlessly.

The WhatsApp Flow input in Zenvia NLU allows you to use Flows previously created in Meta and integrate them into assistants during WhatsApp conversations.

By enabling a variety of interactions, this feature allows you to:

  • Present simple input forms (such as appointment scheduling).

  • Create Flows that guide users through multiple screens (such as product requests and selection).

  • Create endpoints that exchange data between screens and enable more complex interactions.

💡 Tip:  To learn more about Meta Flows, visit the original documentation: Creating a Flow - WhatsApp Flows - Documentation - Meta for Developers.

In this article, you will find:

  • Use case example

  • Integrating a Meta Flow into the Chatbot

⚓ Use case example

To better understand how this feature works, consider the following scenario using our company as an example:

The first step takes place on Meta, where a Flow is created. Imagine that Zenvia creates a WhatsApp Flow using the Sign up for an event template, which allows the creation of a form for customers to interact with.

Now, imagine that this customer is browsing a social network such as Instagram and comes across a sponsored Zenvia campaign. WhatsApp is triggered when the user taps the CTA button.

Next, a reply message is sent to Zenvia's WhatsApp chat, where the bot captures the user's information. The first interaction takes place through the form that was created.

See the example below of how the Flow is developed and created in Meta:

After understanding the use case, the next section explains how to configure a Meta Flow in the Zenvia NLU chatbot.

⚓ Configuring a Meta Flow in the Chatbot

To configure a Flow created in Meta in your Zenvia NLU chatbot, follow the instructions below:

  1. Access your virtual assistant in Zenvia NLU.

  2. Click an existing node or create a new one to configure the Flow.

  3. Select the WhatsApp Flows input.

The structure of the specific Flow data is defined through JSON, which follows the structure below:

Structure

{
  "zenvia": {
    "type": "flow",
    "payload": {
      "id": "",
      "token": "",
      "header": "",
      "body": "",
      "footer": "",
      "button": "",
      "mode": "draft | published",
      "action": {
        "type": "navigate | data_exchange",
        "screen": "",
        "data": {}
      }
    }
  }
}

Attributes

  • header (optional): Title of the message that opens the Flow.

  • body: Body text of the message that opens the Flow.

  • footer (optional): Footer text of the message that opens the Flow.

  • button: Text displayed on the button that opens the Flow.

  • id: Unique Flow ID provided by WhatsApp.

  • token: Flow identification token generated by the brand.

  • mode: "draft" for a draft Flow or "published" for a published Flow. Default value: "published".

  • action.type: "navigate" or "data_exchange". Default value: "navigate".

  • action.screen: ID of the first screen to be displayed in the Flow. Required when action.type is "navigate".

  • action.data (optional): Input data for the first screen of the Flow. It must be a non-empty object.

How to use the data captured by WhatsApp Flow

After a WhatsApp Flow input, the specific data type generated becomes available as input.flow.

This data stores all the information entered by the user in the Flow form.

This information can be:

  1. Viewed during the customer service interaction.

  2. Used in other parts of the builder.

  3. Stored in context and contact variables.

For example, if the Flow collects information such as name, CPF (Brazilian individual taxpayer registration number), and email address, you can save:

  1. The entire input object: {{input.flow}}

  2. A specific field: {{input.flow.data.email}} or {{input.flow.data.cpf}}

Example response:

{
  "input": {
    "flow": {
      "body": "Sent",
      "data": {
        "cep": "00000-000",
        "cpf": "00000000000",
        "email": "teste@gmail.com",
        "marketing_optin": true,
        "name": "Teste ",
        "tos_optin": true
      },
      "token": "9fb0e349-8b75-9faa-c85fd9e78ac6:5511516:129818005"
    },
    "valid": false
  }
}

It is important to note that this type of response is generated by forms that require users to fill in information, and that the input.flow data is only available until the user's next input. If the information is not saved at that point, it will be lost.

Important: Zenvia NLU follows Meta's best practices for building components. For information about character limits for each field, for example, refer to the official documentation.

That's it! The configuration is complete. See below for an example of how the WhatsApp bot receives the event created in the Flow:

⚠️Attention:Due to a requirement imposed by Meta, Flows cannot be executed on WhatsApp Web. They are only available in the WhatsApp mobile app.

Did this article solve your doubts?
Recently viewed