enhancementgood first issueintegrationnew-featurenew-integration
Metriche repository
- Star
- (1930 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Description
Add Clockwise integration to sync calendar optimization data, scheduling preferences, focus time blocks, and meeting analytics into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/google-calendar/- Similar calendar management systemintegrations/cal_com/- Scheduling integrationintegrations/slack/- For reference
Required Files Structure
integrations/clockwise/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Clockwise API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Clockwise API Integration
Authentication Setup
- Use OAuth 2.0 for user authentication
- API token-based access for server-to-server communication
- Clockwise integrates with Google Calendar and Outlook
Key API Endpoints
GET /api/v1/user/preferences- Get user scheduling preferencesGET /api/v1/user/focus-time- Get focus time blocksPOST /api/v1/events/optimize- Trigger calendar optimizationGET /api/v1/events/flexible- List flexible meetingsGET /api/v1/analytics/meetings- Meeting analytics dataGET /api/v1/analytics/focus-time- Focus time analyticsPOST /api/v1/scheduling-links- Create scheduling linksGET /api/v1/team/availability- Team availability windows
Events to Track
- Calendar Optimization - Meetings rescheduled, focus time created, conflicts resolved
- Focus Time - Focus time blocks created, protected, or interrupted
- Meeting Analytics - Meeting frequency, duration trends, meeting-free days
- Scheduling Events - Scheduling link usage, availability checks, team coordination
- Preferences Changes - Working hours updates, focus time preference changes
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 authentication flow in
account-create.ts - Create API utilities in
utils.ts - Implement sync logic in
schedule.tsfor calendar events, focus time, and analytics - Convert calendar optimization events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Clockwise operates on top of Google Calendar and Outlook - may need to coordinate with existing calendar integrations
- Focus time and flexible meeting concepts are Clockwise-specific features
- The API uses standard REST conventions with JSON responses
- Clockwise has a GitHub organization (
clockwisehq) with potential SDK resources - Successful API calls return HTTP 204 (No Content) for mutation operations
Resources
Labels
enhancement, integration, new-feature