/dialogflow-firebase-restaurant-bot

Customizable Restaurant Bot using Google's Dialogflow and Firebase functions.

Primary LanguageJavaScript

Dialogflow-Firebase Restaurant Bot

Customizable Restaurant Bot using Google's Dialogflow and Firebase functions.


Configure Dialogflow

  • Go to www.dialogflow.com log in with your GMAIL.
  • Create an agent.
  • Create the following intents:

  • Create training phrases for all of them like this:
  • Configure "Actions", "Parameters" and "Prompts" only for the Book a table intent:

Go all the way to the bottom part of an Intent's page and you will see Fulfillment.
Click on: "Enable webhook call for this intent".
Enable this option on ALL of the intents (don't forget the Default Welcome Intent as well).

Always SAVE your changes on the intent's after modifying something.

Configure Firebase


Go to https://firebase.google.com/ an you should be login automatically to the same GMAIL account.
On the top-right click on "GO TO CONSOLE", an voila your Dialogflow project should be there already.


Do the following:

  • Click on your project.
  • On the next page click on "Choose data sharing settings".
  • Check both boxes on the pop-up window that will open and click on "Finish".

Install Firebase functions


**Run: npm install -g firebase-tools**
**Cd into the functions folder and run npm install**

Watch the following tutorial: https://www.youtube.com/watch?v=DYfP-UIKxH0
(*You won't need to NPM install anything because everything is already in the package.json of the repo*).

On the same functions folder run "firebase deploy" to deploy your functions to handle the intents on the back-end.

Copy the Function URL


- Go to your Dialogflow agent page, click on **Fulfillment** on the left menu.
- Then enable Webhook and past the link of the functions.
- Save the changes.


Test your bot with the simulator

You can integrate your bot with Facebook or Slack in the "Integrations" menu of your Dialogflow console.

Happy hacking!