Draft — in editorial review, not yet published. Content has not been approved by a human reviewer.
Lesson 26 / 50 · Version 2.2.0
Calendly Webhooks and Integrations
- Level
- Intermediate
- Duration
- 15 min learn + 15 min apply
- Prerequisites:
- Lessons 15, 16, 17, and 25
Why it matters: Bookings only create value when they reach your CRM correctly, including cancellations and reschedules. The tricky part is that one reschedule produces two events.
By the end you can:
- Decide when to use the API vs. webhooks
- Choose a subscription scope and events
- Map events to CRM changes without duplicates
- Reconcile ambiguous sequences
Learn (15 min)
1. API or webhook? (5 min)
Calendly's current API is v2 (REST). Use API calls to retrieve or manage supported data on demand. Use webhook subscriptions for event notifications. Access depends on account role and plan, and the old v1 should not be used for new work.
2. Subscriptions and verification (5 min)
Choose a scope (user or organization) and the events you need, typically invitee.created and invitee.canceled. Register your HTTPS endpoint and verify each request using Calendly's documented signature header and your signing key (see Lesson 16). Store the token and signing key in protected credentials.
3. Reschedules and state (5 min)
A reschedule produces an invitee.canceled event for the old time (marked as a reschedule) and an invitee.created for the new one. Don't assume delivery order equals final state. Key your CRM record on a stable identifier, apply changes idempotently, and reconcile with the API when sequences are unclear.
| Event | CRM action |
|---|---|
invitee.created | Create/update meeting; link to contact; set stage "Booked" |
invitee.canceled (not reschedule) | Mark canceled; trigger follow-up task |
invitee.canceled (reschedule) + new created | Update to the new time; no "canceled" outreach |
Apply (15 min)
Worked example (3 min). Flow: verify signature → ignore unknown types → look up the contact by invitee email → upsert meeting keyed by invitee/event URI → set owner → notify → store event ID. A nightly job lists upcoming events via API and compares with CRM; mismatches go to a review list.
Lab (7 min): Sequence test.
- Write the exact CRM state after each sequence: (a) created; (b) created then canceled; (c) created, then reschedule (canceled + created); (d) duplicate delivery of (a); (e)
createdarrives aftercanceledbecause of delay. - For (e), describe how API reconciliation fixes the final state.
Deliverable: A five-row state table. You're done when: Rows (d) and (e) produce no duplicates and the correct final state.
Check yourself (5 min)
- Which API version is current?
- When use a webhook?
- What can a reschedule produce?
- Scenario: Staff see a "canceled" email sent to a customer who merely rescheduled. What logic was missed?
- How do you reconcile ambiguous events?
Reference
Common mistakes
| Symptom | Likely cause | Fix |
|---|---|---|
| Customer told "canceled" after reschedule | Treated every cancel the same | Check the reschedule flag |
| Duplicate meetings | No dedupe on event/invitee ID | Upsert on stable IDs |
| Old tutorials fail | v1 examples | Use v2 docs |
Cheat sheet: Use v2 → subscribe to needed events → verify sender → dedupe → handle reschedules → reconcile.
Key terms: API v2, webhook subscription, invitee, scope, reconciliation.
Interview prompts: How do you keep a CRM in sync with a booking tool?
Go deeper: Calendly API introduction · Webhook subscriptions · Webhook examples · v1 → v2 migration
Next: Lesson 27 — the CRM itself.