A Facebook Messenger Bot built with Node.js and the Google Cloud Dialogflow API. Based on natural conversational experiences with users seeking movie recommendations, the bot passes conversation entities to The Movie Database API and retreives movies for users.
A webhook service is designed to handle all received user messages, via Express routes, from the Facebook Messenger and Dialogflow APIs. The webhook passes off the Messenger request to the Dialogflow API, which interprets the conversation intents & entities. Finally, the resulting entities are queried using The Movie Database API and returned to the webhook, which sends generated responses back to Messenger.
- Facebook Developer Account & FB Page for Bot
- Google Cloud Account & Application Credentials
- The Movie Database API Key
Install all local dependencies from package.json
by executing the following:
npm install
To spin up the webhook server, navigate to the directory where webhook.js
exists and excute the following:
node webhook.js
Note: The server listens on any specified port, or PORT 3000 by default.
- Facebook Messenger V2.6
- Google Cloud Dialogflow V2
- The Movie Database V3
- Body-Parser: For parsing incoming request bodies
- Config: For configuring Node.js application
- Dialogflow: For creating natural conversational experiences with users
- Express: For designing the webhook
- Request-Promise: For simplistic HTTP requests with Promise support