Connect Google Calendar for attendance-triggered events.
Connect a service account to one Google Calendar and verify the narrow event behavior that the current GymCore source actually implements.
Access and dependencies
- Use a WordPress administrator with
manage_optionsand a Google Workspace or Google Cloud owner who can manage a service account and calendar sharing. - Prepare the full service-account JSON key and the destination Google Calendar ID.
- Share the destination calendar with the service-account email and grant the minimum permission needed to create events.
- Current source subscribes only to GymCore’s
class_attendedevent. It does not expose a general class-schedule sync, date range, direction, or daily-sync control.
Exact steps
Safe stop: Save and test the connection, but stop before producing a class_attended event until the destination calendar and fictional staging records are confirmed.
-
Open GymCore Admin > Integrations and find the Google Calendar card.
-
Select Connect. Enter Service Account JSON (paste full JSON key file) and Google Calendar ID (e.g. primary or [email protected]).
-
Select Save & Connect.
Expected: The card changes to Connected only after GymCore obtains a Google access token. Credentials are stored encrypted in the site’s WordPress database.
-
Select Test Connection.
Expected: The card reports Healthy when GymCore can obtain another access token. This check does not create a calendar event.
-
On a staging site, use a staff-controlled class and member to produce the GymCore
class_attendedevent once.Expected: GymCore posts one Google event using the class post title,
_gym_class_start,_gym_class_end(or the start value when end is empty), and the WordPress site timezone. -
Verify the final result in the owning systems: open the destination Google Calendar and compare its event title, start, end, and timezone with the GymCore class record.
Expected: The Google Calendar event matches the GymCore source class. If no event appears, do not describe the integration as ready.
Effects, limits, and credential safety
The current implementation sends a new Google Calendar events request when class_attended fires; it does not search for an existing event before posting. Repeating the source event may therefore create duplicates. Disconnect removes the encrypted service-account configuration and cached token from WordPress but does not delete events already created in Google Calendar. Rotate the Google key if it was exposed, and never paste it into a ticket, chat, or screenshot.
Owner handoff: Tell the site administrator the source event is
class_attended, not “class schedule changed.” Give them the GymCore class ID, event time, calendar ID, and Google event link—never the JSON key.
If the calendar result is wrong
- Connect fails: confirm the JSON is complete, the Calendar API is enabled, and the service-account key is still active.
- Healthy but no event appears: confirm a
class_attendedevent actually fired and the class has_gym_class_startdata. - Event appears in the wrong calendar: disconnect, confirm the Calendar ID, reconnect, and delete the incorrect event in Google Calendar.
- Duplicate events appear: stop repeating the attendance event and remove duplicates in Google Calendar; disconnecting does not clean them up.
Related guides
Need help?
Describe one problem and the installed versions. Never send passwords, license keys, API keys, payment details, or member records.