Cal.com Integration
Cal.com handles scheduling for onboarding calls and ongoing client meetings. The service wrapper lives in reformer-platform/services/cal-com-service.js and is invoked by the automation orchestrator whenever a client signs up.
Environment Variables
Set the following in Render/GitHub secrets:
CAL_CLIENT_ID=...
CAL_CLIENT_SECRET=...
These credentials must belong to the Cal.com OAuth client configured for managed users.
Key Features
- Authentication:
authenticate()requests an OAuth token using client credentials. - Managed users:
createManagedUser,getManagedUsers, andrefreshManagedUserTokensmanage per-client Cal.com accounts. - Event types:
getEventTypesandcreateEventTypehandle meeting templates (e.g., kickoff calls). - Bookings:
getBookings,getBooking,cancelBookingexpose scheduling data for orchestration or CRM updates. - Webhooks:
createWebhook/createPlatformWebhookregister Cal.com events back to our backend. - Health check:
testConnection()verifies credentials and connectivity.
Automation Touchpoints
- Onboarding orchestrator provisions a managed user for each client and sets up event types.
- Cal booking events trigger Intercom notifications (
trackCalBooking) and ClickUp task updates. - Cal webhooks flow into
/api/cal/webhook(see orchestrator docs) to keep CRM state in sync.
Testing
- Run
calComService.testConnection()(via scripts or REPL) to ensure credentials work. - Use Cal.com dashboard to confirm managed users/event types appear after onboarding.
- Verify Cal → Slack/CRM notifications when bookings occur.
Keep Cal.com credentials rotated and audit managed users periodically to ensure dormant accounts are removed.***