Setup
- Basic configuration
- Manual configuration
You will need:
1
In Botpress Studio, select Explore Hub in the upper-right corner.
2
Search for the Google Calendar integration, then select Install Integration.
3
In the Configuration menu, select Authorize Google Calendar.
4
Follow the instructions to connect Botpress to your Google account.
For more advanced use cases, you can manually configure the integration.Follow Google’s official guide to delegate domain-wide authority to your service account.When configuring the OAuth scopes in the Google Admin Console, paste in the following scopes (comma-separated):Fill in the integration’s configuration fields:
When you’ve filled in all the fields, select Save Configuration.
You will need:
- A published bot
- A Google account
- Access to Google Cloud Console
Step 1: Create a Google Cloud project
1
Go to the Google Cloud Console and sign in with your Google account.
2
Go to Select a project, then select New Project.
3
Enter your project details:
- Project name: Choose a descriptive name for your project.
- Organization: Select your organization (if applicable).
- Location: Choose the appropriate location.
4
Select Create and wait for the project to be created.
5
Verify you’re in the correct project by checking the project name next to the Google logo.
Step 2: Enable the Google Calendar API
1
In the Google Cloud Console, open the left sidebar and go to API & Services > Credentials.
2
Select + Create Credentials > API Key to create an API key. Copy and store it somewhere.
3
Go to Library, search for “Google Calendar API”, and select Enable.
Step 3: Create a service account
1
Open the left sidebar again and go to API & Services > Credentials.
2
Select + Create Credentials > Service Account.
3
Enter a Service account name. The Service Account ID will be automatically generated.
4
The remaining fields are optional. Select Done to create the service account.
5
Select your newly created service account, then go to the Keys tab.
6
Select Add Key > Create new key, choose JSON as the key type, then select Create.A JSON file will be downloaded to your machine. Keep this file secure—you’ll need it to configure the integration.
The downloaded JSON file contains sensitive credentials. Store it securely and never share it publicly. The file structure looks like this:
Report incorrect code
Copy
{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "...",
"private_key": "...",
"client_email": "[email protected]",
"client_id": "...",
"auth_uri": "...",
"token_uri": "...",
"auth_provider_x509_cert_url": "...",
"client_x509_cert_url": "...",
"universe_domain": "googleapis.com"
}
Step 4: Enable domain-wide delegation (Google Workspace only)
Domain-wide delegation is required if you want your bot to:
- Create Google Meet links for events
- Send invitations to attendees
- Act on behalf of users in your organization
@gmail.com accounts do not support domain-wide delegation.Report incorrect code
Copy
https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/calendar.events
Step 5: Configure OAuth consent screen (if not already configured)
1
Open the left sidebar again and go to API & Services > OAuth consent screen.
2
Select Get started.
3
Configure the OAuth consent screen. Under App Information:
- App name: Enter a name for your application.
- User support email: Select your email address.
4
Under Audience, select Internal. Then, select Next.
5
Under Contact Information, enter a contact email address. Then, select Next.
6
Agree to the Google API policy, then select Create.
Step 6: Create OAuth client
1
Select Create OAuth client.
2
Select an Application type and enter a name. Then select Create.
Step 7: Configure scopes
1
Go to Data Access in the left sidebar, then select Add or remove scopes.
2
Add the following scopes:
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/calendar.events
3
Select Update.
Step 8: Grant calendar access to the service account
1
Open Google Calendar and select the settings icon in the upper-right corner. Then, select Settings.
2
In the left sidebar, select the calendar you want to share with your bot.
3
Go to Shared with > + Add people and groups.
4
Enter the
client_email from your downloaded JSON file (for example, [email protected]).5
Set the permission to Make changes to events so the bot can manage calendar events.
Step 9: Configure the integration in Botpress
1
In Botpress Studio, select Explore Hub in the upper-right corner.
2
Search for the Google Calendar integration, then select Install Integration.
3
In the Configuration menu, select the drop-down and choose Configure manually.
Calendar ID
Calendar ID
- In Google Calendar, go to Settings and select your calendar.
- Scroll to Integrate calendar to find your Calendar ID.
- Copy the Calendar ID and paste it into the Calendar ID field in Botpress.
Client Email
Client Email
Open the JSON file you downloaded in Step 3 and copy the
client_email value.Private Key
Private Key
Open the JSON file you downloaded in Step 3 and copy the entire
private_key value, including the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- markers.Impersonate Email (Google Workspace only)
Impersonate Email (Google Workspace only)
Enter the email address of a user in your Google Workspace that the service account will impersonate.This field is required for:
- Creating Google Meet links
- Sending attendee invitations
This field only applies if you have configured domain-wide delegation. Personal @gmail.com accounts do not support impersonation.
You’ve successfully configured the Google Calendar integration!
Limitations
Different Google account types have different capabilities when using this integration.| Feature | Google Workspace | Personal (@gmail.com) |
|---|---|---|
| Create, read, update, delete events | Yes | Yes |
| Create Google Meet links | Yes | No |
| Invite attendees | Yes (requires domain-wide delegation) | No |
Cards
Here’s a reference for all Cards available with the integration:Check Availability
Create Event
Show child attributes
Show child attributes
Available options:
default, birthday, focusTime, fromGmail, outOfOffice, workingLocationAvailable options:
confirmed, tentative, cancelledAvailable options:
default, public, private, confidentialDelete Event
This Card has no output.
List Events
Show child attributes
Show child attributes
Show array item properties
Show array item properties
Available options:
default, birthday, focusTime, fromGmail, outOfOffice, workingLocationAvailable options:
confirmed, tentative, cancelledAvailable options:
default, public, private, confidentialUpdate Event
Show child attributes
Show child attributes
Available options:
default, birthday, focusTime, fromGmail, outOfOffice, workingLocationAvailable options:
confirmed, tentative, cancelledAvailable options:
default, public, private, confidentialTriggers
Here’s a reference for all Triggers available with the integration:You can access data returned from any of these Triggers by reading
event.payload after the Trigger fires.