Google Calendar Integration¶
WFM can synchronise scheduled shifts and breaks to Google Calendar. Synchronisation is triggered manually via the "Google Sync" button on the schedule plan. Events are created in a Google Calendar assigned to the workplace.
Prerequisites¶
Google Cloud Console¶
- Service Account - Created in Google Cloud Console with Domain-wide Delegation enabled.
- OAuth Scopes - Configured in Google Workspace Admin Console:
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/calendar.events
WFM settings¶
Configure Google integration in Settings > Integrated Applications > Google:
| Field | Description | Where to get it |
|---|---|---|
| Client ID | Service account Client ID | Google Cloud Console > IAM > Service Accounts |
| Client Email | Service account email | JSON key file (client_email field) |
| Signing Key | Private key | JSON key file (private_key field), include the full key with -----BEGIN/END PRIVATE KEY----- |
| Subject | Google Workspace user email | Email of the user on whose behalf the service account acts (e.g., admin@company.com) |
Workplace settings¶
Configure each workplace in the Google tab of the workplace form:
| Field | Type | Description |
|---|---|---|
| Google Calendar ID | Dropdown | Calendar where events will be written. "Primary Calendar" = subject's main calendar. Only calendars with write access are shown. |
| Synchronize Schedules | Toggle | Enable synchronisation of shifts |
| Synchronize Breaks | Toggle | Enable synchronisation of breaks |
| Show Attendees Name in Title | Toggle | Show employee names in event title (e.g., "Morning Shift (John Doe, Jane Smith)") |
Set up Domain-wide Delegation¶
Domain-wide Delegation allows the service account to act on behalf of users in your Google Workspace.
- Go to Google Cloud Console > IAM & Admin > Service Accounts.
- Select the service account and go to Advanced settings > Domain-wide Delegation.
- Go to Google Workspace Admin Console (admin.google.com) > Security > API Controls > Domain-wide Delegation.
- Click Add new and enter:
- Client ID of the service account
- Scopes:
https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/calendar.events
- Wait a few minutes for changes to propagate.
Synchronise schedules¶
How to sync¶
- Open the schedule plan.
- Click Google Sync in the top bar.
- Wait for synchronisation to complete.
What gets synchronised¶
Shifts:
- All shifts from the schedule plan (not just emergency shifts)
- Conditions:
- Workplace has
Synchronize Schedulesenabled - Shift has assigned employees (attendees)
- Workplace has
- Each event contains:
- Summary: Shift name (optionally with attendee names)
- Attendees: Emails of all assigned employees
- Time: Shift start and end
Breaks:
- Conditions:
- Workplace has
Synchronize Breaksenabled - If
Choose Breaks to Synchronizeis enabled: only selected breaks (whitelist)
- Workplace has
- Each event contains one attendee (the employee on break)
Notifications¶
Events are created with sendUpdates: 'all' - all attendees receive an email notification from Google Calendar. Before the first synchronisation, be aware that all assigned employees will receive emails.
Notes¶
- Synchronisation is manual - click the button each time you want to sync.
- Events are updated if they already exist (matched by internal event ID).
- Deleted or orphaned events (without attendees) are removed from Google Calendar.
- Authentication is shared via cookies on the same domain.
- The calendar dropdown only shows calendars where the subject user has write access.