cal.com
cal.com copied to clipboard
[CAL-499] Choosing the email you want to be displayed as the organizer
What does this PR do?
Fixes #5774
Demo
https://www.loom.com/share/06ee5751444c4c53a8ff43bcc2b1cd8c

CAL-499 Choosing the email you want to be displayed as the organizer
- I have a personal cal.com account for (eg mynamegmail.com).
- I also want to use cal.com for my work purposes. To do that I attached my corporate Gmail calendar (eg mynamemycompany.com) to the existing personal cal.com account. As a result now I get scheduled events in the right calendar (mynamemycompany.com) but as a participant I am displayed there with my personal email (mynamegmail.com)
Desired outcome
-
Let the user choose on a per event basis which email address for them to appear as the organiser for.
-
The list of choices should be pulled from their list of connected calendars.
-
We would likely place this alongside the "Add to calendar" UI in the event type settings
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
api | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 19, 2024 2:50pm |
cal-demo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 19, 2024 2:50pm |
cal-staging | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 19, 2024 2:50pm |
ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 19, 2024 2:50pm |
web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 19, 2024 2:50pm |
web-staging | 🔄 Building (Inspect) | Visit Preview | Mar 19, 2024 2:50pm |
3 Ignored Deployments
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
cal | ⬜️ Ignored (Inspect) | Visit Preview | Mar 19, 2024 2:50pm | |
dev | ⬜️ Ignored (Inspect) | Visit Preview | Mar 19, 2024 2:50pm | |
qa | ⬜️ Ignored (Inspect) | Mar 19, 2024 2:50pm |
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
This PR introduced no changes to the JavaScript bundle! 🙌
Current Playwright Test Results Summary
✅ 105 Passing - ⚠️ 2 Flaky
Run may still be in progress, this comment will be updated as current testing workflow or job completes...
(Last updated on 07/26/2023 02:30:37am UTC)
Run Details
Running Workflow PR Update on Github Actions
Commit: 8ad5d97cbd9a343499096d40afaf29a63282e9f6
Started: 07/26/2023 02:28:29am UTC
⚠️ Flakes
📄 apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Stripe integration Paid booking should be able to be rescheduled
Retry 1 • Initial Attempt |
2.70% (7)7 / 259 runsfailed over last 7 days |
5.41% (14)14 / 259 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
1.72% (3)3 / 174 runsfailed over last 7 days |
97.70% (170)170 / 174 runsflaked over last 7 days |

The selected organizer mail now shows up on the success page and in the mail. But as you can see in the above screenshot the calendar event mail is incorrect. We would like to fix that but we could not find the right component to make the changes to. If you could please direct us to the right component it would save us some time. Thank you! cc: @zomars @Jaibles
If you could please direct us to the right component it would save us some time. Thank you! cc: Omar López Ciarán Hanrahan
Hey there, not sure about if this is the correct answer here but did you check on the email templates? https://github.com/calcom/cal.com/tree/main/packages/emails/templates
Also checkout CalendarManager where the primary email is passed.
https://github.com/calcom/cal.com/blob/05b42c001f997604cc55e4789ccaaf052cfca434/packages/core/CalendarManager.ts#LL84C1-L84C1
@gitstart-calcom the video in your PR description isn't working. Can you reupload it or maybe use Loom?
@gitstart-calcom the video in your PR description isn't working. Can you reupload it or maybe use Loom?
Sure, we will add a new demo video
@joeauyeung The demo video has been updated now https://www.loom.com/share/06ee5751444c4c53a8ff43bcc2b1cd8c
Apologies for the delay on the change request. We were trying to tackle some edge cases and got to the following conclusion:
We have tried 2 approaches trying to avoid modifying the db:
- For the booking success page, we tried fetching the destination calendar alongside the booking data. But to retrieve the corresponding calendar email would take a lot of computation. Taking how it is done in CalendarManager.ts in getCalendarCredentials and getConnectedCalendars functions.
- Another option was to make trpc calls within the React function to get the connected calendars and then retrieve the primary (organizer) email from it. An issue with this is that the organizer email won't show on the page load, so we would have to show a loader first (we got feedback to remove it). Another issue is that we would still make this API call in all the files where we need the correct organizer email.
So, storing the email the user wants to show in the eventType db record may be a better approach. We would like to confirm this approach before we go ahead.
Apologies for the delay on the change request. We were trying to tackle some edge cases and got to the following conclusion:
We have tried 2 approaches trying to avoid modifying the db:
* For the booking success page, we tried fetching the destination calendar alongside the booking data. But to retrieve the corresponding calendar email would take a lot of computation. Taking how it is done in CalendarManager.ts in getCalendarCredentials and getConnectedCalendars functions. * Another option was to make trpc calls within the React function to get the connected calendars and then retrieve the primary (organizer) email from it. An issue with this is that the organizer email won't show on the page load, so we would have to show a loader first (we got [feedback](https://github.com/calcom/cal.com/pull/8672#pullrequestreview-1423532947) to remove it). Another issue is that we would still make this API call in all the files where we need the correct organizer email.
So, storing the email the user wants to show in the eventType db record may be a better approach. We would like to confirm this approach before we go ahead.
Thanks for looking into it. I think we can store which email the user wants to be displayed under the event type metadata. Although if a user does not choose to change the displayed email for that event type then default to the email on their profile.
Thanks for looking into it. I think we can store which email the user wants to be displayed under the event type metadata. Although if a user does not choose to change the displayed email for that event type then default to the email on their profile.
Thank you, we will make the changes and get back to you soon
Hi @joeauyeung, we have updated the PR. Please take a look.
Thank you for following the naming conventions! 🙏
why do we have a skeleton here?
Hi @joeauyeung, we have updated the PR. Please take a look.
@joeauyeung could you take a look at this one again?
🤖 Meticulous spotted visual differences in 65 of 302 screens tested: view and approve differences detected.
Last updated for commit 8ad5d97. This comment will update as new commits are pushed.
Hi @joeauyeung, we moved this PR for this other PR, please take a look, we made the requested changes 😄
This can be closed as PR #10348 has the most recent changes