Introduction
This plugin lets authorized users access the details of their Calendar events, create new events, or delete events.
Prerequisites
For using the plugin you'll need to get the API credentials as API Key and API Secret. Create your development account at https://console.developers.google.com and enable the Google Calendar API.
Also working with Access Token requires the use of Google's Playground - https://developers.google.com/oauthplayground/
Setting up
Setup Google Developers Console
- Sign in to Google Console: https://console.developers.google.com
- Access “API & Services”
- Go to the “Credentials” tab and create an OAuth Client ID.
- In the “OAuth 2.0 Client IDs” list click on your created OAuth ID’s name. Add your redirect URls in the same fields.
5. Copy Client ID and Client Secret, and past it in plugins settings fields, API Key and API Secret.
Hint: Remember to save your changes to the console.
Plugin Data / Actions Calls
Next, it is possible to use all API Calls and Actions that the plugin provides. Here is the list of them:
Data Calls
Google Calendar Offline - Retrieve List of Calendars: Returns the calendars on the user's calendar list.
Google Calendar Offline - Retrieve Calendar Details: Returns specified calendar details.
Google Calendar Offline - Retrieve Calendar Events: Returns events on the specified calendar.
Google Calendar Offline - Get Event Details: Returns an event from a specified calendar.
Google Calendar Offline - Retrieve Recurring Event Instances: Returns a recurring event instance.
Action Calls
Google Calendar Offline - Delete Calendar Event: Deletes an event.
Google Calendar Offline - Create a Calendar Event: Creates an event.
Google Calendar Offline - Create a Calendar Event with Attendees: Creates an event with attendee's emails.
Google Calendar Offline - Create Calendar: Creates a calendar
Google Calendar Offline - Delete Calendar: Deletes a calendar
Google Calendar Offline - Create an All Day Calendar Event: Creates an all day calendar event
Google Calendar Offline - Start Watching Events: See the Events with attendees guide for more information on scheduling event
Google Calendar Offline - Stop Watching Events: See the Events with attendees guide for more information on scheduling event
Google Calendar Offline - Edit Event: Edits an event details
Google Calendar Offline - Get User Profile Info: Retrieves user information
Google Calendar Offline - Get Access Token: can update the expired access token. For this action, you'll need to get a refresh token from google playground!
Note: The OAuth Playground will automatically revoke refresh tokens after 24h. You can avoid this by specifying your own application OAuth credentials using the Configuration panel.
Workflow Example
In this example, we demonstrate how to get an access token by exchanging it with a refresh token. This is not necessary if you use Bubble action "Signup/login" and specify OAuth provider "Google Calendar Offline". The access token will be updated automatically.
- On page load, we set the action to get the access token from the user's refresh token:
2. Storing a temporary value through custom state:
3. Making changes to user field idToken by storing the id token of the calendar page:
Changelogs
Update 27/11/2020 -
- Added new API Call for a refresh Access token
Update 01/12/2020 -
- Plugin Minor fixes
Update 31/05/2022 - Version: 1.37.0.
- The 'Edit Event' call is divided into two calls - with and without the participant's email.
Update 13/07/2022 - Version: 1.38.0.
- Added new action 'Create a Calendar Event with Attendees (advanced)
- Added a new 'sendUpdates' parameter to choose whether to notify participants by email or not.
Update 09/04/2024- Version: 1.46.0.
- Added field 'syncToken' in action 'Retrieve Calendar Events’