How to build a Chatbot for Whatsapp with ChatbotGen
Learn how to integrate your Whatsapp Number with your chatbot.
June 13, 2023
Chatbotgen Whatsapp Integration
To integrate WhatsApp, you will need to have a Meta business account and create a new Meta App where we will set up WhatsApp.
In this guide, we will explain each detail of this process.
- If you don’t have a Meta Business Account, create one.
- Create a new Meta App (Facebook)
- https://developers.facebook.com/
- Log in to your account (you must verify your developer account with your phone and email)
- Choose “My Apps”
- Choose “Create App”
- Choose options
- Use case: Other
- App type: Business
- Enter details
- App name
- App contact email
- Business Account
- Navigate to App settings > Basic from the sidebar
3. Add WhatsApp to your Meta app
- Scroll to “Add products to your app” and on ‘WhatsApp’ click Set up
4. Acquire a new business number for WhatsApp
- Skip this step if you already have a number you can use for your WhatsApp bot.
- These are the two providers we suggest:
5. Create a System User in your Business Account
- https://business.facebook.com > Settings > Users > System Users
- Create a new system user
- System user name: Chatbotgen
- System user role: Admin
- Click “Assign Assets”
- Choose ‘Apps’
- Choose the new app (for WhatsApp)
- Toggle ‘Manage app’
- Save changes
- Generate new token for system user
- Choose the app and click on ‘Generate new token’.
- Choose the app and click on ‘Generate new token’.
- Choose ‘Never’ expire
- Choose only permissions: whatsapp_business_messaging
- Choose ‘Generate token’
-
Important: Save this token. You’ll need it in further steps.
6. Configure WhatsApp settings
- Go back to the Whatsapp config in the Meta App,
- If you have closed the page, go back to https://developers.facebook.com/ -> My Apps -> Your App -> WhatsApp Configuration (on the left panel)
- If you have closed the page, go back to https://developers.facebook.com/ -> My Apps -> Your App -> WhatsApp Configuration (on the left panel)
- Add a payment method to your WhatsApp app
- Payment settings
- Add payment method
- Add phone number and business details
- Provide necessary information
- Verify number
7. Get “Phone number ID”
- Go to the Whatsapp API Setup in the Meta App,
- If you have closed the page, go back to https://developers.facebook.com/ -> My Apps -> Your App -> API Setup (on the left panel)
- If you have closed the page, go back to https://developers.facebook.com/ -> My Apps -> Your App -> API Setup (on the left panel)
Copy the phone number ID, you will use it in the next step.
8. Configure ChatbotGen Whatsapp Integration
- Go to Chatbotgen.com and open your Chatbot dashboard.
- Click on the “Integrations” menu.
- Click on the “Whatsapp” integration link.
- At the bottom of the page, click on “Integrate”.
- Click on “New WhatsApp Number”.
- Input ‘Phone number ID’ from the previous step.
- Input ‘Token’ — (Step 5, from the system user in your Business Account)
- Click ‘Add Number Configuration’
- After that, you will have the option to copy the webhook URL and the verification token
You will use both values in the next step.
9. Configure the WhatsApp Webhooks
- Go back to the Whatsapp config in the Meta App,
- If you have closed the page, go back to https://developers.facebook.com/ -> My Apps -> Your App -> WhatsApp Configuration (on the left panel)
- Choose ‘Configure webhooks’
- ‘Edit’ webhook
- ‘Edit’ webhook
- Add a callback URL and Verify token, provided in the previous step
- ‘Manage’ webhook fields
- Add and subscribe to messages v17.0
- Click “Done”.
10. Update business details for your Meta app
- Within your Meta app, go to ‘Settings > Basic’
- Fill in all the necessary information
11. Verify Business Account (optional but recommended)
- https://business.facebook.com/
- Choose ‘Settings’
- Choose ‘Business Account Info’
- Provide necessary information
- Choose ‘Security Centre’
- Choose ‘Start Verification’
- Choose ‘Start Verification’
12. Try your Chatbot!
- Send a message to the phone number to start a conversation with your chatbot.