Help Center

Google Calendar Sync

You can integrate Bookly with Google Calendar so that all new bookings created in Bookly Calendar will be automatically copied to the Google Calendar, and vice versa.

Bookly offers three modes of Google Calendar synchronization:

Before you select the synchronization mode, please read carefully the following instructions to set up the connection between two calendars (this instruction can also be found in Bookly menu > Settings > Google Calendar).

gc-settings-backend.png

Open Google Calendar tab in Bookly menu > Settings. Enter your Client ID and Client secret.

To find your client ID and client secret, do the following:

1. Go to the Google Developers Console and select a project, or create a new one.

2. Make sure that a Calendar API is enabled. Click on APIs and Services (on the left), look for Google Calendar API and enable it.

3. Click on Credentials on the left sidebar menu, and go to the OAuth consent screen. Give a name to the product and click Save.

4. Go back to the Credentials tab, click on Create credentials and select OAuth client ID in a drop-down menu.

google-sync-01.png

5.  Select Web application and provide the necessary information to create your project’s credentials.

6.  For Authorized redirect URIs enter the Redirect URI (can be found in Bookly menu > Settings > Google Calendar). Then click Create.

google-sync-02.png

7.  In a pop-up window, you’ll see your client ID and client secret. Use them to fill up the form in Bookly settings. Click Save.

google-sync-04.png

 

After you’ve configured the settings, go to Staff Members tab, select your employee and click Connect to synchronize staff member’s appointments with Google Calendar.

google-sync-03.png

 

The following video explains how to find the Google Calendar ID:

https://www.youtube.com/watch?v=m_ph_hYT_SY

Finally, log in to your Google account and give the permission for plugin to access your Google Calendar.

 

For current users, if experiencing syncing issues after adding new staff members:

Go to Bookly Settings > Google Calendar > Redirect URI. Copy the updated link and paste it in your Google API Console > Credentials > Web Application > Authorized Redirect URIs.

You did it in the past, and as the URI may change with regular updates of the plugin, you will occasionally need to tell Google API what new URI to authorize.

Doing this will most likely solve the sync issue. If it persists, please let us know at support@ladela.com.

 

One-way sync

If you enable this type of sync, all new appointments created in Bookly Calendar, including custom fields, and any further changes will appear in Google Calendar.

 

Two-way front-end only

If you enable this type of sync, all updates in Bookly will automatically appear in your Google Calendar. Events that were initially created in Google Calendar will not be copied and displayed in your Bookly Calendar. Google Calendar events will be taken into account when offering available time slots to clients in your booking form. So if you have an event in Google Calendar, then the corresponding time slot won’t be available for booking because Bookly will consider this time slot as busy.

Please note that it can take some time to sync all appointments between two calendars which can result in a delay when loading the Time step in a booking form. We recommend that you limit the number of fetched events related to this feature as too many events in Google calendar may lead to a lack of memory in PHP when Bookly tries to fetch all events.

 

Two-way sync

If you enable this type of sync (available with installed Advanced Google Calendar add-on), you’ll get a full two-way synchronization which allows keeping all your Bookly calendar data and any further schedule updates in sync with Google Calendar. All new bookings created or updated in Bookly Calendar will be automatically reflected in the Google Calendar, and vice versa.

Important: it is necessary to configure settings in Google Calendar first, before selecting this type of sync and clicking Save. Your website must use HTTPS.

Please read the following instructions carefully, and visit this page for more details about the implementation of calendar data "incremental synchronization".

Bidirectional sync consists of two stages:

1. Initial full sync is performed once at the very beginning in order to fully synchronize the client’s state with the server’s state. The client will obtain a sync token that it needs to persist.

The first stage of the initial full sync will be performed at the time of the two-way sync activation. When you click Save, all appointments from Bookly will be copied to Google Calendar, and all appointments from Google Calendar will be copied to Bookly.

In the Sync appointments history field, you can specify how many days of past calendar data you wish to sync. For example, if you enter 1 in this field, both calendars will sync appointments history starting from yesterday.

Note: Initial sync may take a long time depending on the number of events to be synchronized.

2. Incremental sync is performed repeatedly and updates the client with all the changes that happened ever since the previous sync. Each time, the client provides the previous sync token it obtained from the server and stores the new sync token from the response.

Incremental sync starts functioning after initial full sync has been performed. Bookly triggers incremental sync when Google Calendar informs your Bookly Calendar about changes by push notifications.

Registering your domain

You must register the domain for any URLs you plan to use to receive push notification messages. In addition, before you register a domain, you must first verify that you own it. This step is an abuse-prevention measure to stop anyone from using push to send messages to someone else’s domain.

Step 1: Verify that you own the domain

Before you can register your domain, you need to verify that you own it. Complete the site verification process using Search Console. For more details, see the site verification help documentation.

Step 2: Register your domain

To register a verified domain name as one of the allowed domains for your project, do the following:

  1. Go to the Domain verification page in the API Console.
  2. Click Add domain.
  3. Fill in the form, then again click Add domain.

At this point, the Google API Console checks all domains in the list against the ones that you have verified in Search Console. Assuming that you properly verified all the domains, the page updates to show your new list of allowed domains. You now can use any of these domains to receive push notifications.

 

If you want to get more technical information, follow these links:

https://developers.google.com/calendar/v3/sync

https://developers.google.com/calendar/v3/push

 

Manual synchronization

You can force a new incremental sync by clicking on the Google Calendar button on the top right of Bookly Calendar.

manual-sync.png

NOTE: When you create All day event in Google Calendar, its status is set to Free by default. You should change its status to Busy to display this event in Bookly Calendar.

02.png

 

Have more questions? Submit a request

43 Comments

  • Avatar
    ron dykes

    If you create an event in google calendar will the email and sms notifications still work?

  • Avatar
    Support Team

    In case you create an event in google calendar - notifications are not being sent for this event.

  • Avatar
    Monique Smit

    When I want to connect an employee to the calendar I get the Error message:

    Error: invalid_client

    The OAuth client was not found.
    Request Details

    access_type=offline
    approval_prompt=force
    scope=https://www.googleapis.com/auth/calendar
    response_type=code

  • Avatar
    Marie Ollu

    When I try to Sync with Google Calendar I get an error message in Bookly:

    Error fetching OAuth2 access token, message: 'invalid_client'

    I checked my client ID and client secret and everything is ok... Do you have an idea?

     

    Thank you!

    Edited by Marie Ollu
  • Avatar
    Support Team

    Feel free to send us an email to support@ladela.com and we'll assist you with this matter.

  • Avatar
    Mark Cross

    Product feature. If you have diary items in your Google Calendar - they DO NOT appear to show in the internal Bookly Calendar within WordPress.

    However when the bookly availability customer facing form is shown via the WordPress site IT DOES remove slots already in the Google Calendar which have not been booked out via bookly.

    It would be nicest to have the best of both worlds have a toggle option on this page to "Show All Google Calendar Items"

    Although it could show an employee's private life, the page still needs to prevent you from overbooking on top of a google calendar. Which at present I think it will allow.

    Cheers Mark

    Edited by Mark Cross
  • Avatar
    Marijus Planciunas

    Hi guys, nice plugin! Question: is it possible to add events to Google Calendar, which will be automatically imported as appointments to this system?
    Just trying to understand, is it required to login into WP for adding phone customers, or can it be done by purely managing barber's calendar events.

  • Avatar
    Kevin Karr

    Hi all,

    Its not clear in the instructions for which user account to set up the Google API at ?

    So far I've created an entirely new Gmail account and API is configured as above. So the question is, is the setup of the API per every staff user's account or just on a primary company gmail calendar which then every staff can be linked to by just logging into and accepting the apps calendar acceptance ?

    So far I've not had any luck getting this work yet..

    Any help here would be appreciated.

    Edited by Kevin Karr
  • Avatar
    Nicolo

    Hi Bookly,

    Can I please clarify that 2way sync will work for team members calendars also. For example if a team member has an appointment entered manually into their google calender, that time slot will no longer be available via the plugin (in addition to plugin appointments being sync'd to the team members cal).

    Thanks in advance for the clarification, the below excerpt suggests it may only be available on the main calendar.

    "With that synchronization enabled, you will also be able to set up the synchronization of individual team members' calendars from Bookly to their Google calendars.

    If needed, you can also make sure that Bookly fetches blocked time slots from your Google calendar. Those time slots will not be suggested to the customer during the booking process."

  • Avatar
    Support Team

    Hi,

    You need to set the API only for one account, then the rest of the staff can connect by themselves with their gmail accounts.

    It's available for staff members, they can connect their calendars to Bookly to use it to block out random time when they're not available for booking.

  • Avatar
    T Horejsi

    Hi..
    Everything is set correctly but it does not sync :/

    I mean just it does not show the bookings made by clients in Google calendar

    Edited by T Horejsi
  • Avatar
    Support Team

    Please check if the copied API keys (client ID and secret) are correct and they don't contain any whitespaces. Besides that you can see what errors are being displayed in the staff members menu.

  • Avatar
    T Horejsi

    Sorry, there seems like everything set OK. Probably it took a while than it was synced.
    And now I can see that there are some appointments visible but not all.
    But now it is shame that I cannot see any appointments most of appointments booked before and after - just I can see two appointments in total only.
    Well, now after testing it is syncing the new made bookings only but it does not check the old bookings.. I would suggest to check why it does not sync the old bookings made before calendar setting..

  • Avatar
    Support Team

    The synchronization will start from the moment you set it up, it won't sync old appointments.

  • Avatar
    Robin Potter

    I reimplemented version 8.0 after trying version 12.1. Version 8.0 stopped syncing information to the staff members google calendar and Version 12.1 will not save staff members.

    Please advise on how to get sync with Google with calendar again with version 8. I have gone through all the steps and still nothing is working.

  • Avatar
    Support Team

    Hi Robin, you’ll need to run this command for your database: ALTER TABLE `wp_ab_staff` CHANGE COLUMN `google_data` `google_data` TEXT. After that update the Redirect URI in google developers console, and for the final step you’ll need to disconnect and connect back all staff members.

  • Avatar
    Robin Potter

    Thanks Denis! That's was the best help I've gotten over the weekend.

  • Avatar
    Tawab

    When I try to Sync with Google Calendar I get an error message in Bookly:

    Error fetching OAuth2 access token, message: 'invalid_client'

    I checked my client ID and client secret and everything is ok... Do you have an idea?
    or is there any youtube tutorial for the google setting in Bookly?

    Thank you!

  • Avatar
    Support Team

    Hi Tawab, you should check the copied API keys, they are either not correct or contain whitespaces.

  • Avatar
    Tawab

    Thanks Denis! the problem is solved.

  • Avatar
    Alexander Reschke

    Hi,

    after I've connected Bookly with Google Calendar Bookly shows "Google Calendar: Could not json decode the token" and the box with the different calendars is empty.
    I compared the keys and URL and everything seems to be fine. How can I fix that?

    Thanks,
    Alex

  • Avatar
    Support Team

    Hi Alex, please follow these steps to solve this error:
    1) Update Bookly to the most recent release – v 12.1;
    2) Update the Redirect URI in google developers console;
    3) Disconnect all staff members and connect them back.

  • Avatar
    Alexander Reschke

    Hi Denis, thank you for your quick response!
    I tried all the steps but unfortunately it didn't worked.
    Are there other solutions?
    Thanks
    Alex

  • Avatar
    Support Team

    Hi Alex, in case it didn't help you, please send us an email to support@ladela.com with this inquiry and the purchase code to look into this matter.

  • Avatar
    Sean Crown

    I set up my Bookly calendar and enabled 2 way sync with my google
    calendar. When I create an appointment on the Bookly calendar it shows up on
    Google, however, Bookly is not fetching events from Google Calendar and
    removing corresponding time slots before displaying the second step of
    the booking form. Please help.

  • Avatar
    Support Team

    Hi Sean, try to change this setting: limit number of fetched events - for a bigger value like 500 events, if the behavior will persist then please send us an email to support@ladela.com with this inquiry.

  • Avatar
    cesar

    Hello
    I am trying to synchronize the calendar api and gives me this error, could you help me, thanks
    Google Calendar: Error refreshing the OAuth2 token, message: '{ "error" : "unauthorized_client" }'

  • Avatar
    Support Team

    Hi, you should check the copied API keys, they are either not correct or contain whitespaces.

  • Avatar
    cesar

    Hello I can not do it

    Could you help me with support to make this installation of the calendar?

    I wait for your news thanks

  • Avatar
    Support Team

    Yes, please send this inquiry and the purchase code to support@ladela.com .

Please sign in to leave a comment.
Powered by Zendesk