WhatsApp flow endpoint trigger
Last updated
Was this helpful?
Last updated
Was this helpful?
The WhatsApp flow endpoint trigger allows you to deploy an endpoint to power a dynamic using a no/low code approach. Using this trigger will provide:
No-Code Endpoint Deployment: Easily set up and configure your dynamic WhatsApp flow endpoint without any coding required. This simplifies the process of deploying an endpoint to manage and respond to incoming requests from a dynamic WhatsApp flows
Automatic Decryption and Encryption: The flow manages the decryption of incoming requests and the encryption of outgoing responses, ensuring secure communication. Simply provide your private key and passphrase during setup, and the system handles the rest.
Integration with Bird CRM Flow Actions: Leverage the full range of Bird CRM flow actions within your WhatsApp flows; for example getting contact information or making third party API requests.
WhatsApp Flows requires a public/private key pair to decrypt/encrypt data between WhatsApp and the flows endpoint. Firstly generate (or provide) the key pair.
It is important that your private key contains the following header information
To regenerate an existing private key to contain the headers you can run the following commands:
Open public_key.pem
in a text editor and copy its content.
Click "Update" to save the public key
In the "Request Decryption and Encryption" section:
Private key: Open the private_key.pem
file in a text editor, copy the entire content, and paste it into the "Private key" field.
Private key passphrase: Enter the passphrase you used when generating the private key into the "Private key passphrase" field.
Click Next
Define Conditions:
You can add more conditions or branches as needed for different types of incoming messages.
Add a Set Variables Step under the appropriate branch (e.g. Branch A
).
Configure the Variables:
For each channel where you will send a dynamic WhatsApp flow navigate to Manage Channels > WhatsApp > WhatsApp Channel > Settings
Paste the content into the "Public key" field.
Select WhatsApp flow endpoint as the trigger for your new Flow
Add a Conditional Step right after the WhatsApp Flow Endpoint trigger
For Branch A, set a condition to check if the incoming request (trigger.payload.action
) equals "ping".
Use the Code Editor to define the variables. For example: