Calendly integration: Zoom-conference bookings fail webhook parsing (Invalid webhook payload structure)
Summary
The Event Scheduled trigger in the Calendly integration (@botpresshub/calendly, v0.0.6) never fires for bookings made on an event type that uses a native Zoom-connected location. The webhook handler logs Invalid webhook payload structure and drops the event entirely. The exact same event type configured with a phone-call (outbound_call) location works correctly.
Root cause
In integrations/calendly/src/webhooks/schemas/locations.ts:
const zoomConferenceSchema = z
.object({
type: z.literal('zoom'), // should be 'zoom_conference'
status: z.string().nullable(),
join_url: z.string().url().nullable(),
data: z.object({ ... }).passthrough().nullable(),
})
.passthrough()Calendly's actual API and webhook payloads use "zoom_conference" as the location type for Zoom-connected locations -- consistent with the sibling schemas in the same file (google_conference, microsoft_teams_conference, webex_conference, etc.), which all use the correct ..._conference suffix.
Since calendlyLocationSchema is a z.union([...]) of every location schema, a payload with location.type: "zoom_conference" fails to match any member of the union (the Zoom schema is checking for the wrong literal). This causes inviteeEventSchema.safeParse() to fail entirely in parseWebhookEvent (src/webhooks/webhook-utils.ts), which returns { success: false, error: new Error('Invalid webhook payload structure') } and drops the whole webhook -- so no Event Scheduled event ever reaches the bot for Zoom bookings.
Reproduction
- Create a Calendly event type with a native Zoom-connected location (not a custom text location).
- Subscribe a bot to the
Event Scheduledtrigger via the Calendly integration. - Book the event type as an invitee.
- Integration logs show
Invalid webhook payload structure; no event is dispatched to the bot. - Repeat steps 1-4 with the same event type set to a phone-call (
outbound_call) location instead -- this works correctly and the trigger fires as expected.
Fix
One-line change in zoomConferenceSchema:
- type: z.literal('zoom'),
+ type: z.literal('zoom_conference'),I've already pushed this fix to a branch on my fork: https://github.com/Peolunics/botpress/tree/fix/zoom-conference-location-type (diff: https://github.com/Peolunics/botpress/compare/master...Peolunics:botpress:fix/zoom-conference-location-type)
I'd like to open a PR with this fix, but pull request creation on this repo is restricted to collaborators. Happy to open the PR myself if I'm added as a collaborator, or a maintainer is welcome to cherry-pick the change directly from the branch above.
Source: botpress/botpress