Syncing with Google Calendar

Available in:Pro

HappenBoard Pro can keep your events and a Google calendar in step. Events you publish on your site appear in the Google calendar, and events added in Google arrive on your site as drafts for you to review.

With the same setup, each person who takes appointments can connect their own Google calendar, so the times they are busy are not offered for booking.

Google Calendar sync needs HappenBoard Pro. See what Pro adds.

Before you start

  • HappenBoard Pro installed and active.
  • A Google account that can edit the calendar you want to use.
  • A site served over https. Google does not accept a plain http address for the connection.
  • An administrator account. The Integrations screen is for users with the integrations permission, administrators by default (see roles and permissions).

Create your Google credentials

HappenBoard talks to Google through an app you create, once, in your own Google Cloud account.

  1. Go to HappenBoard → Integrations and click Configure on the Google Calendar (Pro) card. Keep this tab open.
  2. In the card, click Create a Google Cloud project. Name the project, for example after your site, and click Create.
  3. In Google Cloud, open APIs & Services → Library, search for Google Calendar API, open it and click Enable.
  4. Open Google Auth Platform and fill in the consent screen: an app name and your email address. Under Audience, choose Internal if your account belongs to a Google Workspace organisation, External otherwise.
  5. With External, open Audience and click Publish app. An app left in Testing only works for the test users you list, and Google ends its connection after 7 days.
  6. Open Clients, click Create client and choose Web application as the Application type.
  7. Under Authorized redirect URIs, click Add URI, paste the redirect URI shown in step 3 of the card (see below) and click Create.
  8. Copy the Client ID and the Client secret that Google shows.

The card shows the exact redirect URI to register. Copy it from there: Google compares addresses character by character. It is your site address followed by /wp-json/happenboard/v1/pro/calendar/google/callback:

Code
https://example.com/wp-json/happenboard/v1/pro/calendar/google/callback

If Settings → Permalinks is set to Plain, it is https://example.com/index.php?rest_route=/happenboard/v1/pro/calendar/google/callback instead.

Connect your Google account

  1. Back in the Google Calendar (Pro) card, paste the Client ID and the Client secret.
  2. Click Save credentials.
  3. Click Authorize with Google and choose the account that owns the calendar.
  4. Approve the access Google asks for. If Google warns that it has not verified the app, click Advanced and continue: it is your own app.
  5. Google sends you back to the card. A message confirms Google Calendar connected. and the card shows Connected as with the account’s address.

If you decline, or Google returns an error, the message says so. Connecting sends nothing yet.

Change the Client ID or secret

Once the credentials are saved, the card hides their fields. Two links let you change them:

  • Replace client secret: paste a new secret from Google Cloud and click Save secret. The Client ID and the connection stay as they are.
  • Reset credentials: after you confirm, removes the saved Client ID and secret, and the card asks for them again. This link shows while no account is connected. To change the Client ID of a connected site, click Disconnect first.

Hosts who connected their own calendar (see below) have to connect it again if you switch to another Google Cloud client.

Choose the calendar and turn sync on

SettingWhat it doesDefault
Target calendarThe Google calendar HappenBoard writes to and reads from. Only calendars the account can edit are listed. Your main one is marked (primary).None
Sync events to Google CalendarStarts the sync in both directions. Available once a calendar is chosen.Off
Also import invitationsOff: only events created by this account come back to your site, so nobody can add an event to your site by sending it an invitation. On: invitations are imported too, as drafts.Off

Use a calendar kept for your site, such as “Website events”, rather than your personal one: what you add to the target calendar comes back to your site as drafts.

What syncs, and when

From your site to Google:

  • An event is sent each time you save it while it is published and has no password. Drafts, private and scheduled events stay on your site until they are published.
  • Events published before you turned sync on are sent the next time you save them.
  • Google gets the title, the description with a link back to your event page, the place, the dates and, for a recurring event, its repeat rule. A date you skip in a series is removed from Google the next time you save the event. A single date you move is not sent.
  • Moving an event to the trash marks its Google copy as cancelled. Deleting the event for good removes the copy.
  • If Google cannot take a change because of a temporary problem, such as no answer or a busy server, HappenBoard tries again 5, 15, 60 and 240 minutes later. Other errors are not retried: fix the cause, then save the event again.

From Google to your site, every 15 minutes:

  • A new event in the calendar arrives as a draft on the Events screen. The first check looks back 90 days.
  • Events marked private in Google are never imported.
  • An edit made in Google updates the matching event. It never publishes or unpublishes it.
  • An event cancelled or deleted in Google is marked as cancelled on your site, not deleted.

When an event changed on both sides between two checks, the most recent edit wins.

Check that the sync works

Once sync is on, the card shows a Sync activity section: the last check and how many changes it brought, or its error. Changes that failed after every retry are listed there; saving the event again tries once more.

  • Pull now checks Google straight away.
  • Force full resync reads the whole calendar again on the next check. Keep it for when the two sides look out of step: it is slower and can briefly create duplicates.

Disconnect Google Calendar

Click Disconnect at the bottom of the card and confirm. HappenBoard withdraws its access at Google, stops the sync and forgets which Google event matches which of your events. Your Client ID and secret stay saved, so you can reconnect later with Authorize with Google.

Events already in Google stay there but are no longer updated. If you reconnect the same calendar later, HappenBoard does not recognise those copies: delete them in Google first, or pick another calendar.

Let hosts block their busy times

If you take appointments, each host can connect their own Google calendar, read only. The booking page then stops offering the times when they are busy. This uses the credentials created above; the site connection and the sync switch are not needed.

  1. The host opens their own profile (Users → Profile) and finds the Booking calendar section.
  2. Next to Google Calendar, they click Connect and approve the read-only access.

HappenBoard only reads when the host is busy, never what their meetings are, and checks again every five minutes. With an Internal Google app, only accounts from your Workspace organisation can connect.

If something goes wrong

  • redirect_uri_mismatch: the address registered in Google differs from the one HappenBoard sends. The card shows the right one under Authorize with Google: copy it into your client’s Authorized redirect URIs, https included.
  • invalid_client: Google does not know this Client ID. Click Reset credentials and paste the Client ID again.
  • Google authorisation failed after you approve: the client secret may be wrong. Click Replace client secret, paste it again, then click Authorize with Google.
  • Google says access is blocked: the app is still in Testing. Publish it under Audience, or add the account as a test user.
  • The sync stopped after about a week: the app was in Testing. Publish it, then disconnect and connect again.
  • An event is missing in Google: check that it is published without a password, then save it again.
  • Nothing comes back from Google: the checks rely on WordPress scheduled tasks. See Health and maintenance.

Next steps