Open in Hub v
The official WhatsApp integration allows your users to chat with your bot by messaging a WhatsApp number.
Setup
Basic configuration
Manual configuration
Playground
Visual learner? Check out our WhatsApp guide on YouTube for a step-by-step video guide.
In Botpress Studio, select Explore Hub in the upper-right corner.
Search for the WhatsApp integration, then select Install Integration .
In the Configuration menu, select Authorize WhatsApp .
Follow the instructions to connect Botpress to your WhatsApp account.
Additional requirements:
While setting up your WhatsApp integration, we will ask you to create or select:
After setup is complete, your business will undergo a verification process by Meta , the parent company of WhatsApp. This verification confirms the identity and eligibility of your business to use Meta’s platforms.
For advanced use cases, you can use your own Meta app with our integration. Step 1: Install the integration in Botpress
In Botpress Studio, select Explore Hub in the upper-right corner.
Search for the WhatsApp integration, then select Install Integration .
In the Configuration menu, open the drop-down menu and select Manual Configuration .
Next, fill in the integration’s configuration fields using information from your Meta app:
Used by Meta to verify that you’re the real owner of the provided webhook. Can be any alphanumeric string.
In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize . If you haven’t added WhatsApp as a use case yet, select Add use cases , then Connect with customers through WhatsApp .
Select a WhatsApp business portfolio (if you haven’t already).
Select Generate access token , then copy the token.
In Botpress, paste the token into the integration’s Access Token configuration field.
In your Meta App’s left sidebar, expand the App Settings menu and select Basic .
In the App Secret field, select Show , then copy your secret.
In Botpress, paste the secret into the integration’s Client Secret configuration field.
Default Bot Phone Number ID
In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize . If you haven’t added WhatsApp as a use case yet, select Add use cases , then Connect with customers through WhatsApp .
Select a WhatsApp business portfolio (if you haven’t already).
Under Select a ‘From’ phone number , copy the Phone number ID .
In Botpress, paste the ID into the integration’s Default Bot Phone Number ID configuration field.
WABA ID (WhatsApp Business Account ID)
In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize . If you haven’t added WhatsApp as a use case yet, select Add use cases , then Connect with customers through WhatsApp .
Select a WhatsApp business portfolio (if you haven’t already).
Under Select a ‘From’ phone number , copy the WhatsApp Business Account ID .
In Botpress, paste the ID into the integration’s WhatsApp Business Account ID configuration field.
When you’ve filled in all the fields, select Save Configuration . This will automatically enable your integration. Step 3: Add your webhook Now that you’ve enabled your integration, you can add your webhook to your Meta app’s configuration:
In Botpress, copy the webhook URL and Verify Token from the integration’s Configuration section.
In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize . If you haven’t added WhatsApp as a use case yet, select Add use cases , then Connect with customers through WhatsApp .
Select a WhatsApp business portfolio (if you haven’t already).
Paste the webhook URL into the Callback URL field.
Paste your Verify Token in the Verify Token field.
Select Verify and save . Then, subscribe to the following webhook fields:
message_template_components_update
message_template_quality_update
message_template_status_update
messages
template_category_update
If you want to test your bot’s behaviour in WhatsApp before going through the actual setup process, you can use the WhatsApp integration playground.
In Botpress Studio, select Explore Hub in the upper-right corner.
Search for the WhatsApp integration, then select Install Integration .
Select Test your agent on WhatsApp .
Follow the instructions to set up the playground.
Cards
Some of the integration’s Cards use WhatsApp message templates to send messages to users. In WhatsApp, these templates support both named and positional parameters . However, the integration currently only supports positional parameters. This means you’ll get an error if you try to provide named parameters in a Card’s conversation.templateVariablesJson field.
Here’s a reference for all Cards available with the integration:
Send Template Message
Start Conversation
Triggers
Here’s a reference for all Triggers available with the integration:
You can access data returned from any of these Triggers by reading event.payload after the Trigger fires.
Message Template Components Update
Show array item properties
Available options: CATALOG, COPY_CODE, EXTENSION, FLOW, MPM, ORDER_DETAILS, OTP, PHONE_NUMBER, POSTBACK, REMINDER, SEND_LOCATION, SPM, QUICK_REPLY, URL, VOICE_CALL
Message Template Quality Update
Available options: GREEN, RED, YELLOW, UNKNOWN
Available options: GREEN, RED, YELLOW, UNKNOWN
Message Template Status Update
Available options: APPROVED, ARCHIVED, DELETED, DISABLED, FLAGGED, IN_APPEAL, LIMIT_EXCEEDED, LOCKED, PAUSED, PENDING, REINSTATED, PENDING_DELETION, REJECTED
Available options: FIRST_PAUSE, SECOND_PAUSE, RATE_LIMITING_PAUSE, UNPAUSE, DISABLED
Reaction Added
Reaction Removed
Template Category Update
Troubleshooting
Not receiving messages from bot on WhatsApp
Until Meta has verified your business, your bot won’t be able to send messages to WhatsApp users, even if you’ve configured it correctly. If you need to test out your bot right away, you can use the WhatsApp Playground while waiting for business verification.
Meta business verification taking too long
Bot receiving WhatsApp messages, but not sending messages back
There may be a problem with the payment method in your WhatsApp business account. Check the billing hub and make sure your payment method is configured correctly.