RASA is an opensource framework for building AI-powered chatbots. You can use RASA to create awesome bots for various channels such as Facebook, Telegram, Slack, etc.
After the announcement of Whatsapp Business API, everyone has been trying to find a way to integrate Rasa with Whatsapp and create engaging bots for the world’s most used messaging platform. When I was trying to do the same, there were no proper guidelines for doing the same and it was super hard to figure out an easy way to do this.
Somehow I managed to make it work using Twilio Whatsapp APIs. I’m going to share those steps in this blog.
I’m assuming you have a trained chatbot using Rasa. If not, go here
Signup for a Twilio account here
Enable Whatsapp sandbox under Programmable SMS
Add Twilio channel to your RASA credentials.yml.
More info here
account_sid: "<TWILIO ACCOUNT ID>"
auth_token: "<TWILIO AUTH TOKEN>"
twilio_number: "whatsapp:<TWILIO NUMBER>"
Launch your rasa instance. You can use ngrok to get a public https URL for your bot instance. More info here
ngrok http 5005; rasa run
Your URL will look something like this https://cde07de9.ngrok.io
Add your Rasa Twilio Webhook to Sandbox configuration
Finally follow the instruction here to join the WhatsApp sandbox from your mobile number
That's it! Now you have your RASA bot integrated with Whatsapp 😌 😍