Integration

Google Calendar Integration

Estimated reading: 3 minutes

The Google Calendar API is a developer tool that enables integration of Google Calendar’s features into applications. It allows for programmatically creating, accessing, and managing calendar events, along with setting notifications, permissions, and real-time updates.

Before creating a Calendar event You have to complete some steps carefully. To create an event you need Client ID and Client Secret. To get those please visit Google Console Cloud

1. Create a New Project:

Go to the Google API Console. From the project drop-down menu, create a new one by selecting Create a new project.


2. Enter a Project Name:

Enter a Project Name (e.g., “Google Calendar API Project”). Select a Location (this is usually your organization or account name). Click on the Create button.


3. Enable the Google Calendar API:

Once your project is created, navigate to the Google API Library. Make sure your new project is selected in the top-left corner. In the search bar, type Google Calendar API.

4. Enable API:

Click on Google Calendar API from the search results. Click the Enable button to enable the API for your project.


4. Create Credentials:

After enabling the API, click on Create Credentials. Select OAuth 2.0 Client ID.


5. Configure Consent Screen:

If prompted, click on the Configure Consent Screen. To create credentials you need to configure the consent screen first.


6. Select User Type:

Choose External if your app will be used outside your organization, otherwise, choose Internal. Click on the Create button.


7. App Information:

Fill in the required information (App Name, User Support Email, etc.). Click Save and Continue until you reach the end, then click Back to Dashboard.

8. Authorized domains:

Enter the domain names where your application is hosted, as well as the developer‘s contact information. Click Save and Continue until the configuration is complete, then click Back to Dashboard.

9. Scopes:

Click Add or Remove Scopes ( You have to add sensitive scopes and non-sensitive scopes ). Click Save & Continue.


10. Test Users (for External apps):

Add email addresses of users who can test your app before it’s published. then click on the Save & Continue button.


11. Summary:

Review all the details you have entered.


12. Create OAuth 2.0 Credentials:

Go back to APIs & Services and click on Credentials. Click Create Credentials and select OAuth 2.0 Client ID.


13. Configure OAuth 2.0 Client ID:

Choose the Application type: Web application: For web server-based apps. Provide a name for your credentials. Add Authorized Redirect URIs (e.g., for web apps, where users will be redirected after authenticating). Click Create.


14. Retrieve the Client ID and Client Secret:

Once the client is created, you will see a pop-up with your Client ID and Client Secret.
Secure Your Credentials: Store the Client ID and Client Secret securely and do not expose them in public repositories.

15. Dashboard setup:

After completing all the steps, open your wp-admin panel and navigate to Settings in Cleanly Booking. Then, Click on the Integration.


You’ll see the Client ID and Client Secret ID in the Google Calendar API Settings section. In the Calendar API Settings, paste your Client ID and Client Secret ID, then connect with Google. You can also control reminder alerts and customer invites.

Don’t forget to click on the Save All Changes Button.

16. Calendar Event:

After completing this setup when a customer confirms a booking, an event will be created in the Google calendar and all the details will be shown. It also simplifies you to manage all bookings.

Leave a Reply