Sunday 10 a.m.–1 p.m. in

Building your own Messenger Chatbot using Python

Akilesh Lakshminarayanan


While designing and developing your own functional chatbot might seem like a herculean task, python makes it extremely easy to add intelligent conversational functionality, and with pretty good accuracy! In addition to this, once you are familiar with Facebook messenger API (which also has a wide range of wonderful conversational interface elements) it’s actually not that hard a task to get your chatbot into production on Messenger. My poster, with the help of a messenger bot I have programmed myself as an example, will be taking you through the whole workflow of setting up your own chatbot. We will start by looking at the important features of the Messenger API, such as automatically sending texts, quick replies and images. Python libraries such as _spaCy_ and _NLTK_ make it very intuitive to add functionality to your bot. I will then be explaining how you can use NLTK for text classification, and spaCy language models for entity recognition and part-of-speech tagging. These python libraries will enable us to add natural language conversational ability to the chatbot. To get your bot up and running on messenger, you need to deploy it on a cloud server. I will be going through the steps involved in getting your app up and running on one such cloud service, _Heroku_. Following this, we will be integrating Messenger with the application deployed on Heroku, for which we need to set up WebHooks (after I tell you what webhooks are!) and authorise the app. Finally, I will be talking about how to get your bot into production for which you will need to do complete some safety formalities (such as setting a privacy policy) as per Facebook’s rules & regulations. We will then discuss how different lines of business can leverage chatbots, and what the potential advantages and disadvantages of chatbots are. By the end, you will be equipped with all the tools necessary to design your own chatbot for your product, and get it up and running on messenger for your Facebook product page!