Skip to content

Conversation

@a-tokyo
Copy link

@a-tokyo a-tokyo commented Nov 10, 2025

Closes #25009

Issue Summary

API v2 POST /bookings creates ACCEPTED bookings but fails to sync to calendar or send emails - Regression of #16512

When creating bookings via the Cal.com API v2 (POST /v2/bookings), bookings were created successfully with status: "ACCEPTED" and appeared on the dashboard, but did not sync to the connected calendar (Google/Outlook) and no confirmation emails were sent.
The API response contained an empty references: [] array, indicating that no calendar event was created.


What does this PR do?

Summary of changes:

  • Added the missing areCalendarEventsEnabled: true flag when creating new requests from the API.
  • This ensures both calendar sync and email notifications are triggered properly for bookings created via API v2.

Files changed:

  • apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts
    • 1 addition, 1 deletion
- Object.assign(newRequest, { userId });
+ Object.assign(newRequest, { userId, areCalendarEventsEnabled: true });

Visual Demo

Before:

  • Booking created via API appears in dashboard but not on connected calendar.
  • No confirmation email sent.

After:

  • Booking appears in both dashboard and connected calendar.
  • Confirmation email is sent to attendee and host.

Mandatory Tasks

  • I have self-reviewed the code.
  • N/A (no documentation changes needed).
  • Verified fix manually via API and connected Google Calendar.

How should this be tested?

  1. Connect a Google Calendar integration.
  2. Send a POST /v2/bookings request with a valid booking payload.
  3. Verify:
    • Booking status: ACCEPTED
    • Calendar event is created in Google Calendar
    • Confirmation emails are sent to both host and attendee
    • API response contains non-empty references

Expected:
Calendar sync and email notifications now function correctly for API v2 bookings.


Closes calcom#25009

### Issue Summary

**API v2 POST /bookings creates ACCEPTED bookings but fails to sync to calendar or send emails - Regression of calcom#16512**

When creating bookings via the Cal.com API v2 (`POST /v2/bookings`), bookings are successfully created with `status: "ACCEPTED"` and show on the Cal.com dashboard, but they **do not sync to the connected calendar** (Google Calendar/Outlook) and **no confirmation emails are sent** to attendees or hosts. The API response shows an empty `references: []` array, indicating Cal.com failed to create the actual calendar event despite having a valid `destinationCalendarId`.

This appears to be a regression or incomplete fix of Issue calcom#16512
@a-tokyo a-tokyo requested a review from a team as a code owner November 10, 2025 19:10
@vercel
Copy link

vercel bot commented Nov 10, 2025

@a-tokyo is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Nov 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2025

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title " fix: calendar events not syncing with v2 api bookings". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@github-actions github-actions bot added the 🐛 bug Something isn't working label Nov 10, 2025
@a-tokyo a-tokyo closed this Nov 10, 2025
@a-tokyo a-tokyo changed the title 🐛 Fix calendar events not syncing with v2 API /bookings fix: 🐛 calendar events not syncing with v2 API /bookings Nov 10, 2025
@a-tokyo a-tokyo reopened this Nov 10, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@dhairyashiil dhairyashiil changed the title fix: 🐛 calendar events not syncing with v2 API /bookings fix: calendar events not syncing with v2 api bookings Nov 15, 2025
Copy link
Member

@dhairyashiil dhairyashiil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please attach before and after loom video, making it draft until then.

@dhairyashiil dhairyashiil marked this pull request as draft November 15, 2025 21:47
@anikdhabal
Copy link
Contributor

Going with this one:- #25049 🙏

@anikdhabal anikdhabal closed this Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API v2 POST /bookings creates ACCEPTED bookings but fails to sync to calendar or send emails - Regression of #16512

4 participants