Google Calendar integration

Since version 1.10.0, all employees can sync their site schedules with personal Google Calendars. This will allow employees to view their bookings without a need to log into your website.

To add Google Calendar integration to your site and the Appointment Booking plugin, you need to firstly create a dedicated app on the Google Developer Console, then sync each employee’s calendar to their profile on your site.

Keep in mind:

  • When an appointment is scheduled via your site, it’s automatically added to the employee’s Google calendar if it’s synced.
  • It’s a one-way sync process. Change the booking statuses or reschedule appointments on the site, not via the Google Calendar. Changes made to the appointment booking on the website are updated in the respective Google Calendar. For example, if you change the booking status to ‘Canceled’, it automatically disappears in the synced employee’s Google calendar. However, the changes you make to the booking in the Google Calendar don’t apply to employees’ working schedules on your WordPress site.

Create an app with the Google Developer Console

Register an app with the Google Developer Console and obtain your Client ID and Client Secret. credentials. For this, do the following.

  • Go to the Google Developers Console.
  • Choose “Create project” or “Select a project” if you have got active ones.
  • google console

  • Fill in the fields like below.
  • project creation google calendar

  • Wait to be redirected to the project dashboard.
  • Go to “Library” in the dashboard.
  • google console dashboard api

  • Select the Google Calendar API.
  • google calendar api

  • Select this API and click “Enable” on the next step.
  • enable google calendar api

  • Find the “Create credentials” button and hit it.
  • get credentials

  • Set Google Calendar API as your credential type. Also select ‘user data’ and click ‘Next”.
  • credential type

  • Create an application name and provide your contact email addresses.
  • app information

  • Save the changes and skip the next step by going to the OAuth Client ID step. Publish the app.
  • publishing app

Hit “Push to production” and confirm your action.

push to production

  • Head to “Credentials” > click “Create credentials” > choose OAuth client ID in the drop-down menu.
  • create credentials api calendar

  • In the new menu, choose “web application” as an application type. Also click “Add URL”.
  • Find the URL in the Appointment Booking plugin dashboard, copy and paste it to the needed site area. Find it by heading to Appointments > Settings > Integrations > Google Calendar sync URL.

    URL google calendar

    Paste this site URL to the Authorized redirect URL field.

    create oath client

    Fill in the fields and click “Create”. It should generate your Client ID and Client Secret key credentials.

    google secret key

    Put the appropriate keys to the Appointment Booking dashboard via Appointments > Settings > Integrations > Insert keys > save changes.

    secret keys

    Once this connection is established, sync employee’s profile to their Google Calendar.

    Connect employee’s Google calendar to your site

    In order to connect a Google calendar, an employee must log into your site dashboard with their login details and go to Employee > Employee Google Calendar > Connect to Calendar.

    connect user calendar

    By hitting on that button, they must be redirected to their Google account for confirmation.

    There are chances Google will mark this app as not verified. It’s fine, they just need to hit “Advance” and then “Go to <your domain>”. It’s still secure to log in this way since your employees know you and that your website is verified.

    app safety

    Once the connection is successful, they’ll see that the status ‘Connected’ in their profile.

    connected account

    Employees will see all their bookings submitted via the site or added by hand via the site’s dashboard synced to their Google calendars.

    google calendar bookings appointment connect

    Employees might have different Google Calendar settings which can influence their interaction with the calendar and bookings.

    Related Topics