Google Calendar Sync & Google Meet


Slotara provides two-way Google Calendar synchronisation. New bookings create calendar events for the provider; when providers block time on their Google Calendar, those slots are automatically blocked in Slotara's booking engine.

As of v1.5.0, virtual services can also auto-generate a Google Meet link for each booking โ€” delivered in the confirmation email, iCal file, and booking detail view.


Outbound sync (Slotara โ†’ Google)

When a booking is confirmed, rescheduled, or cancelled:

  1. SyncBookingToGoogleCalendar job is dispatched (if calendar sync is enabled for that provider)
  2. Creates, updates, or deletes the Google Calendar event via the Calendar API v3
  3. Stores google_calendar_event_id on the booking record for future updates

Inbound sync (Google โ†’ Slotara)

php artisan calendar:sync-busy
  • Fetches all calendar events for each connected provider from the Google Calendar Events API
  • Writes busy blocks to provider_slot_overrides (type blocked)
  • The slot availability engine excludes these blocks when generating bookable slots
  • Runs hourly via Laravel scheduler

Setup

1. Super Admin โ€” configure Google OAuth

  1. Create a project at console.cloud.google.com โ†’ APIs & Services โ†’ Credentials
  2. Enable the Google Calendar API
  3. Create an OAuth 2.0 Client ID (Web application type)
  4. Add your domain's callback URL: https://yourdomain.com/manage/calendar/oauth/callback
  5. Copy the Client ID and Client Secret to your .env:
GOOGLE_CALENDAR_CLIENT_ID=your-client-id
GOOGLE_CALENDAR_CLIENT_SECRET=your-client-secret

2. Tenant โ€” enable calendar sync

  1. Go to Manage โ†’ Integrations โ†’ Calendar Sync
  2. Enable Google Calendar sync
  3. Click Connect Google next to each provider and sign in with that provider's Google account (the business owner can do this for each provider)

{warning} If Google shows Error 400: redirect_uri_mismatch, the callback URL above is missing from your OAuth client's Authorized redirect URIs. If it shows Access blocked: app has not completed verification, your OAuth consent screen is in Testing โ€” add each provider's Google account as a test user, or publish the app.

3. Cron โ€” schedule inbound sync

Ensure the Laravel scheduler is running (the calendar:sync-busy command is scheduled hourly):

* * * * * cd /path-to-project && php artisan schedule:run >> /dev/null 2>&1

OAuth flow

Provider clicks "Connect Google"
    โ””โ”€โ–บ GET /manage/calendar/oauth?provider_id={id}
            โ””โ”€โ–บ Google OAuth consent screen
                    โ””โ”€โ–บ GET /manage/calendar/oauth/callback
                            โ””โ”€โ–บ Stores access_token + refresh_token on provider record
                                (encrypted; tokens refreshed automatically before API calls)

Disconnect

From Manage โ†’ Communication โ†’ Calendar Sync, click Disconnect next to a provider to revoke the integration. The provider's tokens are cleared from the database. Future bookings will not sync until the provider reconnects.



Google Meet auto-generation

v1.5.0

When a provider has Calendar sync connected and a service has Is Virtual enabled with Auto-generate Google Meet link on, Slotara requests a Meet link from the Calendar API at booking time.

How it works

Client books virtual service
  โ””โ”€โ–บ BookingWizard calls GoogleCalendarSyncService synchronously
          โ””โ”€โ–บ POST /calendar/v3/calendars/{id}/events?conferenceDataVersion=1
                  โ””โ”€โ–บ Google returns hangoutLink (or entryPoints fallback)
                          โ””โ”€โ–บ meet_link stored on booking
                                  โ””โ”€โ–บ Confirmation email fires with "Join Video Call" button

Requirements

Requirement Details
Provider connected Provider must have Google Calendar sync authorised (Manage โ†’ Integrations โ†’ Calendar Sync)
Google account The connected account must support Google Meet โ€” Google Workspace or a personal Gmail with Meet enabled
Service is virtual is_virtual = true and generate_meet_link = true on the service

Choosing Zoom / Teams instead

To use a custom room link instead of auto-generating Meet:

  1. Edit the service โ†’ Virtual Session
  2. Set Auto-generate Google Meet link โ†’ OFF
  3. Paste your Zoom or Teams URL in Custom Video Call URL

The custom URL will appear in emails and iCal for all bookings of that service.

Disabling Meet for one service only

generate_meet_link is a per-service setting. You can have some services use Google Meet and others use a static Zoom room โ€” each service is configured independently.

{warning.fa-exclamation-triangle} If Meet generation fails (provider not connected, or Google account does not support conferencing), a warning is logged and meet_link is left null. The email will fall back to service.video_link if set, or omit the video button entirely.


Key files

File Purpose
app/Support/TenantCalendarSettings.php Settings accessor
app/Services/GoogleCalendarSyncService.php Google Calendar API wrapper
app/Jobs/SyncBookingToGoogleCalendar.php Outbound create/update job
app/Jobs/DeleteBookingFromGoogleCalendar.php Outbound delete job
app/Console/Commands/SyncGoogleCalendarBusy.php Inbound busy-block command
app/Filament/Tenant/Pages/CalendarSettings.php Tenant settings page
app/Http/Controllers/GoogleCalendarController.php OAuth redirect + callback
tests/Feature/GoogleCalendarSyncTest.php Feature test suite