Retrieves the list of calendars accessible to the authenticated user.
A calendar ID to use for auth lookup
Promise resolving to array of available calendars
Begins synchronizing events from a specific calendar.
Sets up real-time sync for the specified calendar, including initial event import and ongoing change notifications. The callback function will be invoked for each synced event.
Auth is obtained automatically via integrations.get(provider, calendarId).
Sync configuration options
ID of the calendar to sync
Configuration options for calendar synchronization.
Controls the time range and other parameters for calendar sync operations. Used to limit sync scope and optimize performance.
OptionaltimeMin?: Date | nullEarliest date to sync events from (inclusive).
OptionaltimeMax?: Date | nullLatest date to sync events to (exclusive).
Use cases:
Function receiving (activity, ...extraArgs) for each synced event
Additional arguments to pass to the callback (type-checked, no functions allowed)
Promise that resolves when sync setup is complete
Stops synchronizing events from a specific calendar.
ID of the calendar to stop syncing
Promise that resolves when sync is stopped
Base interface for calendar integration tools.
Defines the standard operations that all calendar tools must implement to integrate with external calendar services like Google Calendar, Outlook Calendar, etc.
Architecture: Tools Build, Twists Save
Calendar tools follow Plot's core architectural principle:
This separation allows:
Implementation Pattern:
Tool Implementation Rules:
Recommended Data Sync Strategy: Use Activity.source and Note.key for automatic upserts without manual ID tracking. See SYNC_STRATEGIES.md for detailed patterns and when to use alternative approaches.
Example