integrations/googlecalendar/hub.md
The Google Calendar Integration allows you to seamlessly interact with Google Calendar within your Botpress bot. This integration provides various actions to manage calendar events, enhancing the functionality of your bot.
Unfortunately, automatic configuration is temporarily unavailable.
We are currently in the process of getting our Google Calendar integration verified by Google. Once this verification is complete, you will be able to use the automatic configuration method to set up the Google Calendar integration with just a few clicks. Until then, you will need to create your own Google Cloud Platform (GCP) Service Account by following the steps outlined in the Manual configuration using a service account section below.
0.x to 1.xIf you are migrating from version 0.x to 1.x, please note the following changes:
The integration now supports both OAuth and service account authentication methods. If you wish to continue using a service account key, you will need to select Configure manually with a Service Account Key in the configuration dropdown menu and reconfigure the integration. See the Manual configuration using a service account section down below for more information.
When creating or updating calendar events, you can now optionally specify the recurrence and visibility settings for the event. These new fields are also now being returned when listing events.
When creating or updating events, the ISO 8601 date-time format is now fully supported and it is no longer necessary to input dates as RFC 3339 strings.
1.x to 2.xIf you are migrating from version 1.x to 2.x, please note the following changes:
The integration has been refactored to remove the generic CRUD interface actions and de-duplicate redundant actions. The action names have changed from the previous interface-based naming convention. You will need to update any workflows or code that references the old action names:
eventCreate→createEventeventDelete→deleteEventeventList→listEventseventUpdate→updateEventeventReadhas been removed (uselistEventsinstead)
To set up the Google Calendar integration using OAuth, click the authorization button and follow the on-screen instructions to connect your Botpress chatbot to Google Calendar.
When using this configuration mode, a Botpress-managed Google Calendar application will be used to connect to your Google account. However, actions taken by the bot will be attributed to the user who authorized the connection, rather than the application. For this reason, we do not recommend using personal Google accounts for this integration. You should set up a service account and use this account to authorize the connection.
Once the connection is established, you must specify the identifier of the calendar you want to interact with. This identifier can be found by navigating to the calendar in Google Calendar and opening the settings for that calendar. Once in the settings, you will find the Calendar ID in the Integrate calendar section. This is the value you need to provide in the configuration.
Select a resource dropdown in the top navigation bar and selecting New Project.APIs & Services section.Library in the left sidebar.Google Calendar API and click on the result.Enable button to enable the Google Calendar API for your project.IAM & Admin section.Service Accounts in the left sidebar.Create service account button.Service account ID field.Done to proceed. There is no need to grant any roles or permissions at this stage.IAM & Admin section.Service Accounts in the left sidebar.Keys tab.Add Key button and select JSON.client_email field. This is the email address of the service account you created. Copy the email address, excluding the quotation marks. You will need this email address to share your calendar with the service account and to configure the integration in Botpress.private_key field. This is the private key associated with the service account. Copy the private key, excluding the quotation marks. You will need this private key to configure the integration in Botpress.
This public key begins with
-----BEGIN PRIVATE KEY-----\nand ends with\n-----END PRIVATE KEY-----\n. You must copy the entire key: everything that is between the quotation marks.
Settings and sharing.Shared with section, click on Add people.Make changes to events.Please note: your organization may have restrictions on sharing calendars with external users. If you are unable to share the calendar with the service account email address, you may need to use a different account or ask your organization's administrator for help.
Settings and sharing.Integrate calendar section, you will find the Calendar ID. You will need this ID to configure the integration in Botpress.The impersonateEmail field is required for Google Meet creation and attendee invitations. This field must correspond to an email address of a person actually in your Google Workspace.
When to use impersonateEmail:
How to configure:
impersonateEmail must be a valid email address of a user in your Google Workspace domain.Once the Google Calendar Integration is configured, you can use it to manage calendar events within your Botpress bot. Here are some common use cases:
The integration provides powerful capabilities to enhance your bot's scheduling and event management functionalities.
When creating or updating a calendar event, you can specify the recurrence settings for the event. The recurrence settings are defined using the RFC 5545 standard, which allows you to define complex recurrence patterns for events. Here are some examples of recurrence rules:
RRULE:FREQ=DAILYRRULE:FREQ=DAILY;COUNT=5RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FRRRULE:FREQ=MONTHLY;BYMONTHDAY=15RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1RRULE:FREQ=MONTHLY;BYDAY=1MORRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MORRULE:FREQ=DAILY;UNTIL=20261231T000000ZRRULE:FREQ=WEEKLY;BYDAY=MO;EXDATE=20260325T000000ZYou can use these recurrence rules to create events with complex repeating patterns. You may also use online RRULE generators to create custom recurrence rules for your events.