chappi

chappi-messenger-bot

This is a Facebook messenger bot that uses BotKit library and is hosted by local tunnel with Node.js in the backend.

Inspiration

Facebook just launched the messenger bot this week and we wanted to build something cool with it. So we thought of building a bot that will be interactive and let's you buy bunch of stuff from Internet.
This messenger bot can have simple conversations from asking you name and remembering it, to responding to the requests like "Chappi i wanna buy a pizza" and populating a list of the specific pizza that you requested.

How we built it

The idea started with recognizing the messages from the user and responding logically to them. So we build a bot in Node.js that reads the input and output messages from the webhook on Facebook messenger. So the backend controller reads the incoming messages and responds as per the requests. First we run the facebook_bot.js and host it in local tunnel to get the URL which is used by webhook to make postback calls from the Messenger bot. This gives us the easy access to receive the request and serve them accordingly.

Challenges we ran into

Due to the fact that the messenger bots were just released recently, the amount of documentation and the lack of the community for the bots hindered our ability to quickly run the bots. Actually running the webhook took a while to set up. We decided to use Heroku at first as most developers suggested using that. However, we figured that using the localtunnel is a much better option. Another challenge we faced was actually recognizing the keywords within the user's input. This made it difficult to understand what the user ideally wanted out of the conversation it exchanged with the bot.

Accomplishments that we're proud of

We're really excited that we have implemented a clean bot messenger as compared to the buggy chat bots out there. Another accomplishment is that we did not use the Wit.AI supervised module, instead we build our own input recognition bot.

What we learned

We learned how to work with the Facebook Messenger bot by using node.js + webhooks. It exposed us to new technologies that we were not truly comfortable with prior to the hackathon.

And we'd definitely look into implementing more features that could make the bot more flexible in practical real world situations.