Skip to content

UTS capstone project: A meeting scheduling chatbot that detects conflict in the user's schedule and suggest the best time for meetings, integrated in Facebook Messenger. Tech stack: Google Dialogflow, Google Calendar APIs, Java, H2 database.

Notifications You must be signed in to change notification settings

HaiAnhTrinh/chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scheduling Chatbot with Dialogflow

UTS Engineering Capstone project

Supervisor: Dr. Wei Liu

Scheduling Chatbot enables the users to book a meeting on the Google Calendar and reserve a room available in a company. The chatbot is able to detect conflicts and suggest the closest suitable timeframe for all attendees. It also helps allocate the meeting to the most suitable room provided within an organisation. All communication will take place on Facebook Messenger.

Demo

https://www.youtube.com/watch?v=0N0W994G8Q4

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  1. Follow this link to set up a new project in Google Cloud Platform. For this project, just follow the Create a project section. Google Cloud Setup

  2. Enables Calendar API in the Google Cloud console and create the credentials for OAuth 2.0 Client IDs.

  3. Follow the steps in the Create an agent section to create a new Dialogflow agent.

  4. Finish the Setup for Facebook Integration.

  5. Install Intellij IDEA Ultimate version

  6. Install ngrok (if you don't own a public server or domain).

Installing

Step 1: Configure the JDK to be 12.0.1 or above, install all dependencies with Maven.

Step 2: Download the created credentials for OAuth 2.0 as credentials.json inside src/main/resources/ directory.

Step 3: Modify Spring configurations for H2 database in application.properties. Change the datasource.url to suit your working directory.

Image

We use H2 embedded database to avoid complex configuration during the development process.

In case you want to use a different database manager for deployment, the queries to create the tables are in query.sql to help you set up your own database.

Step 4: In the Dialogflow console, go to settings and import chatbot.zip to your agent.

Image

Step 5: Run the project in your IDE, you should see the following contents in your console.

Image

Step 6: Use ngrok to expose your running localhost server with the following command

ngrok http 8080

This will generate a temporary URL linking to localhost:8080.

Image

Copy the generated URL provided by ngrok and place it as the URL for the webhooks in Dialogflow console.

Image

Step 7: If you completed the prerequisites, you should have an app in Facebook for Developers. Add a facebook user as a tester for the app.

Image

Step 8: Insert a new user to USER table in the database. The new user data must have all values except for FB_ID.

Step 9: Use the facebook tester account to start a conversation with the chatbot. On the first interaction with the server, the users will be asked to register their identity. This will fill up the missing FB_ID field.

Image

About

UTS capstone project: A meeting scheduling chatbot that detects conflict in the user's schedule and suggest the best time for meetings, integrated in Facebook Messenger. Tech stack: Google Dialogflow, Google Calendar APIs, Java, H2 database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages