MeetStream Guide: Calendar Integration & Auto-Scheduling
MeetStream Guide: Calendar Integration & Auto-Scheduling
This guide explains how to connect your Google Calendar to MeetStream so bots can automatically join your meetings — no manual API calls required.
Applies to: Google Meet, Zoom, Microsoft Teams meetings on your Google Calendar.
What you get with Calendar Integration
Once connected, MeetStream can:
- See your upcoming meetings — synced directly from Google Calendar with incremental sync for speed
- Schedule bots for specific meetings — one click or one API call
- Auto-schedule bots for all meetings — hands-free, every day
- Handle recurring meetings — automatically reschedule bots for the next occurrence
- React to calendar changes in real time — if a meeting is rescheduled, the bot’s join time updates automatically; if a meeting is cancelled, the bot is cancelled too
- Manage scheduled bots — list, update, or delete scheduled bots at any time
- Keep webhooks alive — watch channels are automatically renewed before they expire
1) Get your Google OAuth credentials
Before connecting your calendar, you need three things from Google: a Client ID, Client Secret, and Refresh Token. Follow these steps to get them.
Step 1: Create a Google Cloud project and OAuth credentials
- Go to the Google Cloud Console.
- Create a new project (or use an existing one).
- Navigate to APIs & Services > Library and enable the Google Calendar API.
- Go to APIs & Services > Credentials.
- Click Create Credentials > OAuth 2.0 Client ID.
- Set the application type to Web application.
- Under Authorized redirect URIs, add:
- Click Create and copy your Client ID and Client Secret.
Step 2: Run the OAuth helper to get your refresh token
MeetStream provides a lightweight Node.js helper that runs the OAuth consent flow locally and returns your refresh token.
Prerequisites: Node.js installed on your machine.
- Create a
.envfile in the project root with your credentials:
- Install dependencies
- Create the server.js file and paste this code
- Start the helper server
You’ll see:
- Open http://localhost:3000 in your browser.
- Sign in with your Google account and grant calendar access.
- After authorization, the page displays your Refresh Token and Access Token.
- Copy the Refresh Token — you’ll need it in the next step.
If the refresh token is not returned, revoke MeetStream’s access at https://myaccount.google.com/permissions and try again. Google only returns a refresh token on the first consent or after a revoke.
Required scopes
The helper requests these scopes (read-only calendar access + basic profile):
You now have everything you need: Client ID, Client Secret, and Refresh Token.
2) Connect your Google Calendar
With your credentials ready, connect your Google Calendar to MeetStream.
API endpoint
Request body
What happens behind the scenes
- MeetStream validates your credentials by refreshing the access token with Google.
- Fetches all your calendars (primary, secondary, shared).
- Stores your credentials securely (encrypted at rest in AWS SSM Parameter Store).
- Sets up push notification channels on all calendars you have write access to — so MeetStream is notified in real time when events are created, updated, or cancelled.
- Fetches your Google profile info (email, name) for display purposes.
Example cURL
Response
Note: If you call this endpoint again with updated credentials, MeetStream replaces the existing connection — no need to disconnect first.
3) View your calendars
After connecting, you can list all calendars linked to your Google account.
API endpoint
Example cURL
Response
This is a live call to the Google Calendar API and always returns the latest calendar list.
4) Sync and view your events
MeetStream syncs events from Google Calendar and stores them locally. It detects meeting links for supported platforms (Google Meet, Zoom, Microsoft Teams, Webex, GoToMeeting, BlueJeans, and Whereby).
Sync events from Google Calendar
This is the primary events endpoint. It syncs with Google Calendar (using incremental sync for speed), stores events in MeetStream’s database, and returns them with pagination and linked bot information.
Query parameters
Example cURL
Response
Use the next cursor value in a subsequent request to fetch the next page:
Get events from local database only
This is a lightweight endpoint that returns events already synced to MeetStream without calling the Google Calendar API. Useful when you want fast reads and don’t need the latest sync.
5) Schedule a bot for a specific meeting
Pick a meeting from your synced events and schedule a bot for it.
API endpoint
Path parameters
Request body
The bot_config accepts the same fields you’d normally pass to the Create Bot API.
Example cURL
Response
Scheduling options for recurring events
Deduplication
If you schedule a bot for the same event twice, MeetStream returns a 409 Conflict with the existing bot’s ID. To update the bot config, use PATCH /calendar/scheduled_bots/{bot_id} instead.
6) Unschedule a bot
Cancel a scheduled bot for a specific event.
API endpoint
Request body (optional)
Example cURL
Response
7) Manage scheduled bots
View, update, or delete your scheduled bots across all events.
List all scheduled bots
Returns all bots with a scheduled join time in the future.
Query parameters
Example cURL
Response
Update a scheduled bot
Update the join time, display name, or other properties of a scheduled bot.
Request body
All fields are optional — include only what you want to change.
Response
Delete a specific scheduled bot
8) Enable auto-scheduling
Auto-scheduling is a hands-free mode: MeetStream scans your calendar every 24 hours and automatically schedules bots for all upcoming meetings that have a meeting link.
Enable auto-scheduling
Request body
Provide a default bot configuration that will be used for all auto-scheduled bots:
Example cURL
Response
Disable auto-scheduling
Check auto-schedule settings
How auto-scheduling works
- A background job runs every 24 hours at midnight UTC.
- It finds all users who have auto-scheduling enabled.
- For each user, it looks at upcoming events in the next 24 hours that have a valid meeting link.
- It skips events that already have a bot scheduled (using deduplication keys).
- It creates bot schedules using your
default_bot_config. - Bots are scheduled to join 1 minute before the meeting starts.
You can override individual meetings by manually scheduling them with
POST /calendar/schedule/{event_id}and a custombot_config.
9) Recurring event auto-rescheduling
For recurring meetings (weekly standups, bi-weekly syncs, etc.), MeetStream can automatically schedule a bot for the next occurrence after each meeting ends.
How it works
- A bot joins a recurring meeting.
- After the meeting ends, MeetStream detects it was a recurring event.
- It calculates the next occurrence from the event’s recurrence rule (RRULE).
- A new bot is automatically scheduled for the next occurrence using the same configuration.
This continues indefinitely — every recurring meeting gets a bot, without manual intervention.
Enable auto-rescheduling when scheduling
When scheduling a bot for a recurring event, set recurring_event: true in the request body:
Toggle auto-rescheduling for an existing event
You can enable or disable auto-rescheduling per event at any time:
Response
This endpoint returns 400 if the event is not actually a recurring event (no recurrence rule).
Trigger rescheduling manually
MeetStream also exposes an endpoint to manually trigger rescheduling for the next occurrence:
This is primarily used internally by MeetStream after a meeting ends. You typically don’t need to call it directly.
Supported recurrence patterns
MeetStream supports standard iCalendar recurrence rules (RRULE):
10) Real-time calendar change detection
When you connect your calendar, MeetStream sets up Google Calendar push notification channels (watch channels) on all your calendars. This enables real-time reactions to calendar changes without polling.
What MeetStream handles automatically
How it works under the hood
- Google Calendar detects a change and sends an HTTPS POST to MeetStream’s webhook endpoint.
- MeetStream refreshes the event data from Google Calendar using incremental sync.
- For each event that has an active bot scheduled:
- Single events: The existing EventBridge schedule is updated in place with the new time. The bot record’s
ScheduledJoinTimeis also updated soGET /scheduled_botsreflects the correct time. - Recurring events: All existing schedules are deleted and recreated with the updated recurrence times.
- Cancelled events: The schedule is deleted and the bot record is marked
Cancelled.
- Single events: The existing EventBridge schedule is updated in place with the new time. The bot record’s
You don’t need to re-sync manually or make any API calls — changes are picked up in real time via webhooks from Google.
Watch channel auto-renewal
Google Calendar watch channels expire after approximately 30 days. MeetStream automatically renews expiring channels:
- A background job runs daily at 3:00 AM UTC.
- It checks all connected users’ watch channels.
- Any channel expiring within 2 days is renewed automatically.
- No user action is required — webhooks stay active indefinitely.
11) Disconnect your calendar
To remove the calendar integration entirely:
API endpoint
Example cURL
Response
What this does
- Stops all Google Calendar watch channels (no more push notifications).
- Cancels all pending EventBridge schedules and bot records.
- Deletes all synced event data from MeetStream.
- Removes stored Google OAuth credentials.
This is irreversible. To reconnect, call
POST /calendar/create_calendaragain with your credentials.
End-to-end setup checklist
Here’s the full flow to get calendar integration running:
- Get credentials — Create a Google Cloud project, enable the Calendar API, and run the OAuth helper to get your refresh token
- Connect —
POST /calendar/create_calendarwith your Google OAuth credentials - Sync —
GET /calendar/eventsto pull in your meetings - Schedule —
POST /calendar/schedule/{event_id}to add a bot to a specific meeting - Or auto-schedule —
POST /calendar/auto-schedule/enableto cover all meetings automatically - Recurring — Set
recurring_event: truewhen scheduling, or usePOST /calendar/toggle-recurrence - Relax — MeetStream handles calendar changes, rescheduling, cancellations, and watch channel renewal from here
API quick reference
FAQ
Which calendar providers are supported?
Currently, Google Calendar is the only supported calendar provider. Your Google Calendar can contain meetings from any platform — MeetStream detects Google Meet, Zoom, Microsoft Teams, Webex, GoToMeeting, BlueJeans, and Whereby links.
Do I need a Google Workspace account?
No. Any Google account with Google Calendar works — personal Gmail accounts and Google Workspace accounts are both supported.
How do I get a Google OAuth2 refresh token?
Follow Section 1 of this guide — create a Google Cloud project with the Calendar API enabled, set up OAuth 2.0 credentials, and run the provided OAuth helper (node server.js) to complete the consent flow. The helper displays your refresh token in the browser.
How far in advance does auto-scheduling look?
The auto-schedule job runs every 24 hours at midnight UTC and schedules bots for meetings happening in the next 24 hours. Meetings further out will be picked up in subsequent runs.
When does the bot join relative to the meeting start time?
Bots are scheduled to join 1 minute before the meeting’s start time.
What happens if I reschedule a meeting in Google Calendar?
MeetStream receives a real-time push notification from Google and automatically updates the bot’s scheduled join time to match the new meeting time. Both the EventBridge schedule and the bot record in MeetStream’s database are updated, so GET /scheduled_bots always shows the correct time.
What if I cancel a meeting?
MeetStream detects the cancellation via Google Calendar sync, deletes the EventBridge schedule, and marks the bot as Cancelled. No bot will be created for a cancelled meeting.
What if a meeting is moved to a time that already passed?
MeetStream detects that the new time is in the past, deletes the EventBridge schedule, and cancels the bot record. This prevents a bot from being created for a meeting that can no longer be joined.
Can I schedule bots for meetings without a meeting link?
No. MeetStream requires a valid meeting link (Google Meet, Zoom, Teams, etc.) to join. Events without a detected meeting link are skipped.
What happens if I schedule a bot for the same event twice?
MeetStream deduplicates by event. The second call returns a 409 Conflict with the existing bot’s ID. To update the bot config, use PATCH /calendar/scheduled_bots/{bot_id}.
Can I use different bot configurations for different meetings?
Yes. When you manually schedule a bot via POST /calendar/schedule/{event_id}, you provide the bot_config per event. Auto-scheduling uses your default_bot_config for all meetings, but you can override individual events by scheduling them manually.
Does auto-rescheduling work with all recurrence patterns?
MeetStream supports standard iCalendar recurrence rules (RRULE) — daily, weekly, bi-weekly, monthly, yearly, and custom patterns. The next occurrence is calculated from the event’s recurrence rule.
How do I stop a recurring event from being rescheduled?
Use the toggle endpoint: POST /calendar/toggle-recurrence with "recurring_enabled": false for that event.
Do I need to worry about watch channels expiring?
No. MeetStream automatically renews Google Calendar watch channels before they expire. A daily background job checks for channels expiring within 2 days and renews them. Your real-time calendar sync stays active indefinitely without any action on your part.
What data is deleted when I disconnect my calendar?
Everything: watch channels are stopped, pending bot schedules are cancelled, synced event data is deleted, and Google OAuth credentials are removed from storage. This is irreversible.
Is my Google Calendar data stored securely?
Yes. OAuth credentials are stored in AWS Systems Manager Parameter Store as encrypted SecureString parameters. Event data is stored in DynamoDB with encryption at rest. MeetStream does not store your Google password.
Can I schedule bots for all occurrences of a recurring event at once?
Yes. Pass "schedule_all_occurrences": true in the request body when scheduling. You can limit the number of occurrences with "occurrence_limit" (default 52). Each occurrence gets its own bot and EventBridge schedule.
How do I schedule a bot for a specific occurrence of a recurring event?
Pass "occurrence_date": "2026-04-14T10:00:00Z" in the request body. MeetStream will schedule a bot for that specific occurrence only.
Can I cancel bots for future occurrences only?
Yes. When unscheduling a recurring event, pass "from_date": "2026-05-01T00:00:00Z" to cancel only occurrences from that date forward. Occurrences before that date keep their scheduled bots.
For webhook event handling, see the Webhook Events Guide. For creating your first bot without calendar integration, see the First Bot Quickstart.
