Overview
Google Calendar is the recommended calendar provider for most users. It offers real-time webhook notifications, excellent reliability, and simple OAuth setup.
| Feature | Details |
|---|---|
| Sync Method | Real-time webhooks (push notifications) |
| Rate Limit | 60 requests per minute |
| Multi-Calendar | Yes - Primary + shared calendars |
| Authentication | OAuth 2.0 with PKCE |
| Webhook Expiry | 7 days (auto-renewed by Trix) |
Connecting Google Calendar
Via CLI (Recommended)
# Start OAuth flow
trix integrations connect google
# Your browser will open to:
# 1. Sign in to your Google account
# 2. Grant calendar read permissions
# 3. Redirect back to CLI
# Success! Connection createdThe CLI handles the entire OAuth flow automatically, including PKCE for enhanced security.
Via API
# Step 1: Initiate OAuth
curl -X POST https://api.trixdb.com/v1/integrations/oauth/initiate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "google",
"redirect_uri": "http://localhost:8080/callback"
}'
# Response includes authorization_url - open in browser
# User grants permission, redirected to redirect_uri with code
# Step 2: Complete OAuth
curl -X POST https://api.trixdb.com/v1/integrations/oauth/callback \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "google",
"code": "AUTHORIZATION_CODE",
"state": "STATE_FROM_STEP_1"
}'
# Returns connection_idScopes Requested:
• https://www.googleapis.com/auth/calendar.readonly - Read calendar events
• https://www.googleapis.com/auth/userinfo.email - Identify account
Managing Calendars
List All Calendars
# CLI
trix google calendar list
# Output:
# Work Calendar (primary) - Syncing
# Family Calendar - Not syncing
# Holidays - Not syncingEnable/Disable Specific Calendars
# Enable a specific Google calendar
trix google calendar enable <calendar-id>
# Disable a specific Google calendar
trix google calendar disable <calendar-id>API: Toggle Calendar Sync
# Enable a calendar
PATCH /v1/integrations/connections/{id}/calendars/{calendar_id}
Content-Type: application/json
{
"sync_enabled": true
}
# Disable a calendar
{
"sync_enabled": false
}Viewing Events
Upcoming Events
# Show all upcoming Google Calendar events
trix google calendar list
# Output:
# Today (Jan 12)
# 10:00 AM - Team Standup (30m)
# 2:00 PM - Product Review (1h)
#
# Tomorrow (Jan 13)
# 9:00 AM - 1:1 with Sarah (30m)
# 4:00 PM - Sprint Planning (2h)Unified View (All Providers)
# API: Show events from ALL connected calendars
# (Google + Microsoft + Apple)
curl "https://api.trixdb.com/v1/integrations/calendars/upcoming?days=7" \
-H "Authorization: Bearer YOUR_API_KEY"
# Events are merged and sorted chronologicallyAPI: Get Events
# Get upcoming events
GET /v1/integrations/connections/{id}/events?days=7
# Response
{
"events": [
{
"id": "evt_abc123",
"title": "Team Standup",
"start": "2026-01-13T10:00:00Z",
"end": "2026-01-13T10:30:00Z",
"calendar_id": "primary",
"attendees": [
{
"email": "[email protected]",
"display_name": "Alice Johnson",
"response_status": "accepted"
}
],
"location": "Conference Room A",
"description": "Daily sync meeting",
"conferenceData": {
"type": "hangoutsMeet",
"uri": "https://meet.google.com/abc-defg-hij"
}
}
],
"total": 15
}Real-Time Webhooks
Google Calendar uses webhooks (push notifications) to notify Trix immediately when events change. This enables real-time sync without polling.
How It Works
- When you connect, Trix registers a webhook with Google Calendar
- Google sends notifications when events are created/updated/deleted
- Trix processes the notification and updates your memories
- Webhook subscriptions expire after 7 days
- Trix automatically renews them before expiration (hourly check)
Zero Configuration Required!
Webhook setup, renewal, and management are fully automated. You don't need to do anything.
Webhook URL
For self-hosted deployments, Google Calendar webhooks are received at:
https://your-api-domain.com/v1/integrations/webhooks/googleMake sure this URL is publicly accessible and returns 200 OK for verification requests.
Calendar-Specific Features
Google Meet Integration
Events with Google Meet links are automatically detected and included in event data:
{
"conferenceData": {
"type": "hangoutsMeet",
"uri": "https://meet.google.com/abc-defg-hij",
"entryPoints": [
{
"entryPointType": "video",
"uri": "https://meet.google.com/abc-defg-hij"
}
]
}
}Recurring Events
Recurring events are expanded into individual instances. You'll see each occurrence as a separate event in your upcoming list.
Shared Calendars
Calendars shared with you appear in the calendar list. Enable sync for any calendar you have at least "See all event details" permission.
Permissions & Privacy
What Trix Can Access
- Read calendar events (title, time, location, attendees, description)
- List available calendars
- Receive webhook notifications for changes
- Cannot create or modify events (read-only)
- Cannot delete events
- Cannot share calendars or change settings
Revoking Access
You can revoke Trix's access at any time:
Option 1: Via Trix CLI
# Disconnect and delete all synced data
trix integrations disconnect <connection-id>Option 2: Via Google Account
- Go to myaccount.google.com/permissions
- Find "Trix" in the list of apps
- Click "Remove Access"
Revoking access via Google will cause sync to fail until you reconnect. Disconnecting via CLI is recommended as it properly cleans up webhooks and data.
Troubleshooting
Common Issues
| Problem | Solution |
|---|---|
| OAuth flow opens wrong Google account | Sign out of all Google accounts, then reconnect |
| Events from 3+ days ago not showing | Trix only syncs upcoming events, not historical |
| "Invalid grant" error | Token expired. Disconnect and reconnect |
| Webhooks not working | Try manual sync: trix integrations sync |
| Missing calendar in list | Ensure calendar is shared with connected account |
Get Detailed Diagnostics
# Run built-in troubleshooter
trix integrations troubleshoot google
# Output:
# OAuth token valid (expires in 3542 minutes)
# Webhook subscription active (renews in 6 days)
# Last sync: 2 minutes ago (success)
# Rate limit: 15/60 requests used
#
# Connection healthy!Rate Limits
Google Calendar API allows 60 requests per minute per user. Trix automatically manages this with:
- Smart batching - Multiple calendars fetched in parallel
- Exponential backoff - Retries with increasing delays
- Request tracking - Monitors usage to stay under limits
- Webhook-first - Minimizes API calls via push notifications
For most users, you'll never hit the rate limit. Webhooks handle most updates without API calls, and batch operations optimize the rest.
Next Steps
- Microsoft Outlook Calendar - Connect Office 365 calendar
- Apple iCloud Calendar - Connect iCloud calendar
- Calendar Overview - Compare all providers
- CLI Reference - Full command reference