One poller · one contract · every OS module subscribes
Calendly exposes no webhook on the Base44 connector, so a single scheduled poller diffs /scheduled_events against last-seen state, normalizes each change into the canonical CalendlyTriggerEvent, resolves a routing table, and fans the trigger out to every consuming OS module on the event bus. No consumer calls Calendly directly — the poller is the only ingress.
Ingestion
Scheduled automation polls Calendly REST API on a fixed interval (no webhooks — polling only).
Normalize
Raw Calendly payloads mapped to the canonical CalendlyTriggerEvent contract.
Dedup & State
Diff against last-seen event URIs to detect created / canceled / rescheduled / completed.
Route
Event-type → OS module routing table (config-driven, tenant-aware).
Fan-Out
One confirmed trigger dispatched to every matching consumer on the bus.
Consume
OS modules react: create InterviewSchedule, enrich Lead, schedule Event, notify, etc.
Meeting Scheduled
meeting.scheduled
New event URI appears in /scheduled_events diff
Meeting Canceled
meeting.canceled
Previously-seen URI now has status=canceled
Meeting Rescheduled
meeting.rescheduled
Same URI, start_time changed beyond threshold
Meeting Completed
meeting.completed
end_time passed with status=active
No-Show Detected
no_show.detected
Completed meeting with invitee status=inactive
Backend function · calendlyTriggerPoller
Polls /scheduled_events, diffs against stored state, emits CalendlyTriggerEvent records.
Scheduled automation (every 5 min)
create_automation automation_type="scheduled" → calendlyTriggerPoller. Minimum 5-min interval.
State store · OrchestratorState
Last-seen event URIs + cursor per Calendly user; powers dedup & reschedule detection.
Backend function · calendlyTriggerDispatch
Reads confirmed triggers, resolves routing rules, fans out to consumer functions.
Connector · calendly (SHARED)
Builder authorizes once via request_oauth_authorization; token used server-side only.
Metrics · PlatformMetric + AuditLog
Trigger volume, latency, no-show rate, routing failures — all auditable.