How to set up appointment scheduling in Google Calendar using Flow Builder

In this guide, you will learn how to use the Recognize Intent, Recognize Entities, and Create Google Calendar Event steps in Flow Builder to automatically schedule customer appointments in Google Calendar.


How will we schedule these appointments?

The flow we are going to build will consist of roughly three parts.

The first part will decide what the intent of the user is. This will be done using the Recognize Intent step.

If the user intends to book an appointment, then the second part of the setup will be to ask the customer to provide their preferred appointment date and time. This date and time will then be extracted by the Recognize Entities step.

Once the time of the appointment has been collected, the third step will be to use the Create Google Calendar Event step to schedule the meeting in your Google Calendar and confirm this to the user.

Want to use our pre-made flow?

For this guide, we’re going to create a new custom flow with an Omni-channel trigger.

If you’re new to Flow Builder, or if you want an easy way to set up appointment scheduling, download our pre-made Appointment Bot flow.

Step by step

  1. Log in to your MessageBird Dashboard and go to Flow Builder

  2. Click Create new Flow and select Create Custom Flow from the options that appear (or click on Import Flow, and upload the pre-made Appointment Bot flow)

  3. Follow the Intent Recognition - Quickstart guide to create a dataset and intent recognition step. The dataset needs to include two intents: “appointment” and “question”. Download the example CSV here, or take a look at the sample dataset at the end of this guide

  4. Done? Awesome! Now, set up branching between the intents. This guide will only cover the “appointment” intent, but if you want to set up the “question” intent branch, read our guide to Building an omnichannel FAQ BOT with Intent Recognition

  5. In the “appointment” branch, add the Reply to message step, and set the message reply to “When do you want to book the appointment?”

  6. Add a Wait for a response step, and name the output variable of the response appointment_time_message

  7. Add a Recognize Entities step and set the ‘Content to recognize’ to appointment_time_message

  8. Select your desired Time Zone from the dropdown list. Selecting your time zone makes sure that the extracted time is correct and uniform. Configure the step to recognize time by clicking Add entity and setting the entity to time. Use the variable name appointment_time here, then save both the entity and the step. Now that it’s set up, this Recognize entities step will extract the user’s appointment time preference from the message, and convert it into a standardized time value, which will allow us to create a calendar event later in the setup

  9. Try the Recognize entities step yourself by using the demo page

  10. Now, we want to confirm with the user that we collected their appointment time preference. Add a branch step and create an “else” branch for appointment_time is empty or not set. This branch will handle messages where the user did not give a preferred appointment time, so we’ll set it up to ask the user to provide this information

  11. Add the Reply to channel message step, and set the message reply to “We’re sorry, we couldn’t understand your request. When do you want to book the appointment?”

  12. Add a Jump to step and select the Wait for a response step that we created in step 6

  13. Next, return to the “else” branch of the branching step that you created in step 10

  14. Add a Create Google Calendar Event step. Make sure you have connected your Google account in the integrations tab. Select your account and calendar in the step settings

  15. For the Event Title, use both the contact.firstName and contact.lastName variables to create an event named for the current contact. In the Start of Event field, use the appointment_time.normalized variable, which will ensure the date is correctly interpreted

  16. Add your own email address to the Guests/Participants field, and save the step

  17. Add a Reply to channel message step, and set the message reply to “Great, your appointment is confirmed!”, then save the step

  18. Publish your flow by clicking Publish in the top-right corner of your screen, and you're good to go!

Next steps and other uses

Recognize more entities

Time is not the only entity that can be recognized by the Recognize Entities step. Other uses could be to extract the number of guests the appointment is for, or recognize the place where the appointment takes place, or even to create and recognize your own custom entities via the Knowledge Base tab.

Use another calendar

Google calendar not the calendar of your choice? With the HTTP Request, you can connect to any calendar service that exposes an API, or even your own backend.

Sample dataset

appointment,Can I book an appointment?

appointment,Can I create a booking?

appointment,I'd like to come by soon

appointment,Where do I make a booking for visiting your place?

appointment,I want to visit

question,What are your opening hours?

question,Can I bring a pet?

question,Where can I find you?

question,How do I reach you?

question,Lemme ask you a question

question,How old is your company?

Last updated