Skip to content

Google Calendar Integration

Two-way sync between AvailEngine and Google Calendar.

Plan requirement

Google Calendar sync requires a Growth plan or higher (€29.99/mo). The free and Starter plans do not include calendar integration. See Pricing for details.

Overview

When a business connects their Google Calendar:

  • Push sync: Bookings in AvailEngine → events in Google Calendar
  • Pull sync: Events in Google Calendar → blocked slots in AvailEngine

This means a business owner sees all their bookings in Google Calendar, and AvailEngine never double-books a slot that's taken in the business's personal calendar.

Connecting

bash
curl https://api.availengine.com/integrations/google/connect \
  -H "Authorization: Bearer YOUR_JWT"

Response:

json
{
  "authorization_url": "https://accounts.google.com/o/oauth2/v2/auth?..."
}

Redirect the business user to authorization_url. They log in with their Google account and grant access. Google redirects back to your configured callback URL, and AvailEngine stores the encrypted tokens.

Checking Status

bash
curl https://api.availengine.com/integrations/google/status \
  -H "Authorization: Bearer YOUR_JWT"
json
{
  "connected": true,
  "email": "business@gmail.com",
  "calendar_id": "primary",
  "last_synced_at": "2026-05-15T14:00:00Z",
  "sync_enabled": true
}

Disconnecting

bash
curl -X DELETE https://api.availengine.com/integrations/google/disconnect \
  -H "Authorization: Bearer YOUR_JWT"

This revokes the Google token and removes all imported blocked slots.

How Push Sync Works

  1. A booking is created/updated/cancelled in AvailEngine
  2. In a background task, AvailEngine finds the calendar connection for that business
  3. Creates/updates/deletes the corresponding Google Calendar event
  4. Stores google_event_id on the booking for future syncs
  5. Logs the operation to calendar_sync_log

Push sync is best-effort — a failed Google API call never fails a booking.

How Pull Sync Works

  1. Google sends a push notification to AvailEngine when the calendar changes
  2. AvailEngine fetches the changed events via incremental sync
  3. New/modified non-AvailEngine events → blocked slots
  4. Deleted events → unblocked slots
  5. A polling job runs every 15 minutes as fallback

Blocked Slots

Slots from Google Calendar are stored in the blocked_slots table. The availability endpoint automatically excludes any booked slot that overlaps with a blocked slot.

View blocked slots

bash
curl https://api.availengine.com/integrations/google/blocked-slots \
  -H "Authorization: Bearer YOUR_JWT"

Manual override

bash
curl -X DELETE https://api.availengine.com/integrations/google/blocked-slots/{id} \
  -H "Authorization: Bearer YOUR_JWT"

This overrides a blocked slot — it won't be re-imported on the next pull sync.

Sync Log

Debug issues by checking the sync log:

bash
curl https://api.availengine.com/integrations/google/sync-log \
  -H "Authorization: Bearer YOUR_JWT"

Released under the MIT License.