wbb-google-calendar

0.0.5 • Public • Published

WBB Google Calendar Integration

This project allows you to easily integrate with Google Calendar to fetch free times, and create calendar entries.

Setup

After importing the content for this integration you will be provided with a series of blocks that you can use within your content. As a minimum the blocks will first collect a day that you'd like to arrange a meeting for, and then after collecting a relevant time slot it'll ask for an email address so that it can be invited to the meeting. The start of this flow is the Schedule Meeting block. The Confirmation block is the end of the process and is a basic block allowing you to change the response message etc.

To use this integration you will need a GCP Service Account. This allows the service account to read the calendar, and create calendar entries on behalf of another user. You will also need to configure Domain wide delegation as described in the following notes. This allows the service account to act on behalf of the owner of the calendar.

Finally you may need to invite the service account to be able to make changes to the calendar. This is done via the settings of the calendar as shown below. The email address to invite is that client_email property from within the service account file. This step may not be required.

GMail Settings

Blocks Provided

This integration provides the following blocks under the topic of Google-Calendar.

  • Schedule Meeting - the start of the process that will ask the user for a date for the appointment.
  • Confirmation - the end of the process, for when the meeting has been scheduled.
  • No Calendar Id set - an edge case for when the required settings have not been provided.
  • Confirm Time Selection - replays the selected date & time to the user for confirmation.
  • Create Calendar Entry - follows the Confirm Time Selection block and actually creates the event.
  • Clear Selection - Provides a mechanism to reset the form, and lets the user choose a new date.

Handler Names

The following handler names and their functions are available :

Handler Name Block Purpose
find-free-times Schedule Meeting When given a specific date, will attempt to find free time slots for the current calendar on that day
confirm-selection Confirm Time Selection Plays back the selected date & time to the user for confirmation
create-event Create Calendar Entry Creates the entry in the calendar and sends the user an invite

Configuration Options

Within the function there are a number of options that can be set to configure the behaviour of the integration. The tables below show the settings that are available for each handler.

find-free-times

Property Required Description
credentials true The JSON Service Account credentials for an account that has access to the calendar in question.
freeSlotMessage false The message to display to the user ahead of the choices, when free slots are available.
noSlotsMessage false A message to show to the user if there are no available slots.
startAgainMessage false What is displayed on the button allowing the user to select a different day.
tryAgainBlock false Id of the block that will ask which date the calendar entry is to be booked for
eventDuration false The desired size of gap to look for in a calendar, defaults to 30 min
calendarId true The email address of the calendar you wish to search, ie, andy@wbb.ai
dateFormPropertyName true The property name in the form that contains the date you wish to search for.
earliestHour false The earliest time a meeting can be booked
latestHour false The last time within the day to accept meetings
excludeTimes false An array containing times to exclude
confirmationBlock true The block to send the user to after selecting a time.
dateFormat false The format to display the date in, defaults to dddd, MMMM Do YYYY

confirm-selection

Property Required Description
confirmationMessage true Displays the confirmation message to the user for the date and time they've selected
tryAgainBlock true Id of the block that will ask which date the calendar entry is to be booked for
createEventBlock true The Id of the block used to create the calendar entry
createMessage false The label on the button someone should click when they've confirmed everything is okay.
startAgainMessage false What is displayed on the button allowing the user to select a different day.
dateFormat false The format to display the date in, defaults to dddd, MMMM Do YYYY

create-event

Property Required Description
credentials true The JSON Service Account credentials for an account that has access to the calendar in question.
calendarId true The email address of the calendar you wish to search, ie, andy@wbb.ai
calendarTitle false The subject of the calendar entry
calendarLocation false Details of the location of the meeting.
calendarDescription false Notes that appear in the description of the meeting.
duration true Duration, in minutes. ie, 30.
emailFormPropertyName false The property name in the form that contains the email address you wish to invite to the meeting
confirmationBlock true Block to redirect to when complete.

Readme

Keywords

Package Sidebar

Install

npm i wbb-google-calendar

Weekly Downloads

0

Version

0.0.5

License

none

Unpacked Size

233 kB

Total Files

20

Last publish

Collaborators

  • webuildbots