Many thanks to a Botpress community contributor, Danilo Limo! We're happy to share here his recent how-to, posted in the Botpress community forum. He created a step-by-step tutorial on how to integrate Botpress with Twilio, using Whatsapp and working on his Windows machine. We really appreciate our community, and would love to share any tips, tutorials, or other content devs create with Botpress!
Integration Tutorial
Step-by-step
This tutorial aims to demonstrate how the botpress framework is integrated with Whatsapp through the Twilio platform.
Note: For ease I will describe the step-by-step for Windows since it is the environment I am currently using.
Prerequisites:
To use Twilio as integration of your botpress with Whatsapp it is necessary that your bot has external access via SSL /TLS [ https ]
If your bot is being built in a local environment(localhost) you will need to use a tunnel application such as NGROK so that you can access your localhost externally.
Follow the steps below:
If you are developing your bot in cloud environment, such as Heroku for example, just use the external url of your bot which should look something like this: https://<yourbotname>.herokuapp.com/
Twilio
Now let’s go to Twilio!!
Register your phone number in your account, as Twilio will need it.
Once that’s done, now it’s time to set up your Twilio access credentials in Botpress.
Botpress
In Botpress you perform the following steps:
"messaging": {
"channels": {
"twilio": {
"enabled": false, "change here to true"
"accountSID": "Enter your key accountSID here",
"authToken": "Enter your key authToken here"
}
}
}
It should look like this:
3. Go to \data\global\ folder and open the file botpress.config.json
4. With the file open, change the parameter externalUrl as follows:
"externalUrl": "https://6a3d-a700.ngrok.io",
"session": {
"enabled": true, “If false change to true”
"maxAge": "1h"
},
It should look like this:
{
"$schema": "bp://types/modules/channel-twilio/config.schema.json",
"enabled": true,
"accountSID": " Enter your key accountSID here",
"authToken": " Enter your key authToken here"
}
It should look like this:
6. Now copy the channel-twilio.json file from the \data\global\config folder and paste it into the \data\bots\ folder <your_bot>\config
7. Once that's done, it’s time to restart your Botpress. Once you restart, you should see the initiation log the URL of the Twilio webhook in Botpress. You must present as:
8. Now copy the Twilio webhook url, go to your Twilio account, and paste it into the webhook section, as shown in the image below:
And that's it!
Many thanks to Danilo! You can see his fine original post in the Botpress forum. If you're interested in more Botpress how-to's, check out the Botpress YouTube channel, where we've been adding lots of new developer content over the past few months.
In fact, there is a just-published how-to video on the Botpress Twilio Channel Integration, with up-to-date review of how to use Twilio with Botpress. Check it out!
One common step when building a bot is defining “intents”
As we’ve discussed in other posts, defining what a chatbot is is not a straightforward process if you recognize that...
Up until last month’s F8 you could be forgiven for believing that role of professional UI designers in chatbot...