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.
https://www.youtube.com/watch?v=0N0W994G8Q4
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
-
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
-
Enables Calendar API in the Google Cloud console and create the credentials for OAuth 2.0 Client IDs.
-
Follow the steps in the Create an agent section to create a new Dialogflow agent.
-
Finish the Setup for Facebook Integration.
-
Install Intellij IDEA Ultimate version
-
Install ngrok (if you don't own a public server or domain).
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.
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.
Step 5: Run the project in your IDE, you should see the following contents in your console.
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.
Copy the generated URL provided by ngrok and place it as the URL for the webhooks in Dialogflow console.
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.
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.