This node.js example connector allows you to make your Teneo bot available on WhatsApp using the Twilio API for WhatsApp. This guide will take you through the steps of setting up a Twilio WhatsApp sandbox phone number and deploying the connector so it can respond to messages sent using WhatsApp.
Note that the Twilio API for WhatsApp is currently in Beta and is subject to change before becoming generally available.
Making the connector available via https is preferred. Ngrok is recommended for this.
Your bot needs to be published and you need to know the engine url.
git clone https://github.com/artificialsolutions/tie-api-example-twilio-whatsapp.git
TENEO_ENGINE_URL=<your_engine_url> node server.js
You can make your locally running connector available via https using ngrok as follows:
ngrok http 4337
That's it! Now you can use WhatsApp to interact with your bot!
Click the button below to deploy the connector to Heroku:
In the 'Config Vars' section, add the following:
Next, follow the 'Setup a Twilio WhatsApp phone number' instructions above. Make sure that in the step 4 you set the 'When a message comes in' URL to the url of the Heroku app.
The Twilio API for Whatsapp is currently in beta. For more details, visit the Twilio website: Twilio API for WhatsApp.