cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

fix: use destination calendar email

Open Udit-takkar opened this issue 7 months ago • 8 comments

Fixes: https://github.com/calcom/cal.com/issues/3643

How to test?

  1. Connect calendar integration (like google) with email address different than the account
  2. Create a booking to any event type

Check if email and calendar event is sent to calendar integration email and not account settings email.

Try different combinations:- outlook integration + team event type.. etc

Preference order:- Event type Destination email > Primary Calendar integration Email > Account Email address

TODO

  • [x] Updating all the tests
  • [ ] Testing all edge cases (Individual event type, team event types)

Udit-takkar avatar Dec 15 '23 21:12 Udit-takkar

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ❌ Failed (Inspect) Feb 13, 2024 9:57am
api ❌ Failed (Inspect) Feb 13, 2024 9:57am
cal 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 9:57am
dev ❌ Failed (Inspect) Feb 13, 2024 9:57am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal-demo ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 9:57am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 9:57am
qa ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 9:57am
ui ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 9:57am

vercel[bot] avatar Dec 15 '23 21:12 vercel[bot]

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar Dec 15 '23 21:12 github-actions[bot]

Current Playwright Test Results Summary

✅ 447 Passing - ⚠️ 13 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 02/13/2024 10:14:07am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 775ca2bfe56efab0e5ff926d25b4d8cb814b3910

Started: 02/13/2024 10:05:05am UTC

⚠️ Flakes

📄   apps/web/playwright/booking/multipleEmailQuestion.e2e.ts • 3 Flakes

Top 1 Common Error Messages

null

3 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and checkbox Question Multiple Email and checkbox not required
Retry 1Initial Attempt
0.39% (1) 1 / 254 run
failed over last 7 days
4.72% (12) 12 / 254 runs
flaked over last 7 days
Booking With Multiple Email Question and Each Other Question Booking With Multiple Email Question and Number Question Multiple Email and Number not required
Retry 1Initial Attempt
0% (0) 0 / 253 runs
failed over last 7 days
5.93% (15) 15 / 253 runs
flaked over last 7 days
Booking With Multiple Email Question and Each Other Question Booking With Multiple email Question and phone Question Multiple email and Phone not required
Retry 1Initial Attempt
0% (0) 0 / 252 runs
failed over last 7 days
5.16% (13) 13 / 252 runs
flaked over last 7 days

📄   apps/web/playwright/booking/longTextQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Long Text Question and Each Other Question Booking With Long Text Question and Checkbox Group Question Long Text and Checkbox Group required
Retry 1Initial Attempt
0% (0) 0 / 261 runs
failed over last 7 days
6.51% (17) 17 / 261 runs
flaked over last 7 days

📄   apps/web/playwright/webhook.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Webhook tests FORM_SUBMITTED on submitting user form, triggers user webhook
Retry 1Initial Attempt
0% (0) 0 / 265 runs
failed over last 7 days
5.66% (15) 15 / 265 runs
flaked over last 7 days

📄   apps/web/playwright/booking/selectQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Phone Question and Each Other Question Booking With Select Question and Multi email Question Select required and Multi email required
Retry 1Initial Attempt
0% (0) 0 / 255 runs
failed over last 7 days
6.67% (17) 17 / 255 runs
flaked over last 7 days

📄   apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and multiselect Question Checkbox Group required and multiselect text required
Retry 1Initial Attempt
0% (0) 0 / 262 runs
failed over last 7 days
3.82% (10) 10 / 262 runs
flaked over last 7 days

📄   apps/web/playwright/profile.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Cannot update a users email when existing user has same email (verification enabled)
Retry 1Initial Attempt
0% (0) 0 / 157 runs
failed over last 7 days
49.04% (77) 77 / 157 runs
flaked over last 7 days
Update Profile Can update a users email (verification enabled)
Retry 2Retry 1Initial Attempt
11.59% (19) 19 / 164 runs
failed over last 7 days
51.83% (85) 85 / 164 runs
flaked over last 7 days

📄   apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Address Question and Each Other Question Booking With Address Question and select Question Address and select not required
Retry 1Initial Attempt
0% (0) 0 / 266 runs
failed over last 7 days
5.26% (14) 14 / 266 runs
flaked over last 7 days

📄   apps/web/playwright/booking/radioGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Radio Question and Each Other Question Booking With Radio Question and Address Question Booking With Radio Question and checkbox Question Radio and checkbox not required
Retry 1Initial Attempt
0.38% (1) 1 / 262 run
failed over last 7 days
3.82% (10) 10 / 262 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/preview.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Preview Preview - embed-core should load
Retry 1Initial Attempt
0% (0) 0 / 268 runs
failed over last 7 days
36.19% (97) 97 / 268 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Inline Iframe Inline Iframe - Configured with Dark Theme
Retry 1Initial Attempt
0.75% (2) 2 / 268 runs
failed over last 7 days
44.78% (120) 120 / 268 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Dec 15 '23 22:12 deploysentinel[bot]

📦 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! 🙌

github-actions[bot] avatar Dec 20 '23 13:12 github-actions[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Jan 04 '24 00:01 github-actions[bot]

whats needed here?

PeerRich avatar Jan 08 '24 13:01 PeerRich

@joeauyeung

It feels like we should give users the option of using either the destination calendar email or their account email. I would connect with product to see where this option should be. I think I saw something in the Figma files.

Yeah there was a design earlier in figma ("settings/my-account/profile" page). There was an option to add another email. maybe we add the option there to select email to be used for sending emails and calendar events .. etc.

Udit-takkar avatar Jan 12 '24 15:01 Udit-takkar

@joeauyeung

It feels like we should give users the option of using either the destination calendar email or their account email. I would connect with product to see where this option should be. I think I saw something in the Figma files.

Yeah there was a design earlier in figam ("settings/my-account/profile" page). There was an option to add another email. maybe we add the option there to select email to be used for sending emails and calendar events .. etc.

I would feel comfortable shipping this once we give users that option.

joeauyeung avatar Jan 12 '24 17:01 joeauyeung

Hey there, there is a merge conflict, can you take a look?

github-actions[bot] avatar Jan 23 '24 05:01 github-actions[bot]

@Udit-takkar Are you blocked in this?

ciaranha avatar Feb 08 '24 06:02 ciaranha

@Udit-takkar Are you blocked in this?

No, should be ready soon

Screenshot 2024-02-08 at 3 48 39 PM Screenshot 2024-02-08 at 3 50 14 PM

Udit-takkar avatar Feb 08 '24 10:02 Udit-takkar

We need to make sure to use the correct email in all booking-related emails, I found some places where it's wrong:

  • Cancellation email
  • Request reschedule email
  • I didn't test payments but do we also need to change the email in https://github.com/calcom/cal.com/blob/fix/destination-calendar/packages/lib/payment/getBooking.ts#L99 which is called in handlePaymentSuccess?

@CarinaWolli Fixed Now. Thanks for the review.

Udit-takkar avatar Feb 13 '24 10:02 Udit-takkar

Note sure if this is the right place to post this feedback, but neither [CAL-1684] (#3643) nor [CAL-499] (#5774) appear to be working for me on cal.com after enabling the new setting in my Event Types.

  • The calendar invite still has my cal.com account's email address in the ORGANIZER property, not the email address of the target calendar's owner
    • Verified by viewing the .ics file attached to the email
  • The body of the email still has my cal.com account's email address in the "Who" section as the organizer, not the email address of the target calendar's owner
  • The email was sent to my cal.com account's email address, not the email address of the target calendar's owner

I have verified the new "Display 'Add to calendar' email as the organizer" toggle is checked on my event types, and I have tried toggling it on and off multiple times.

All calendars are Google Calendars using Google Workspace accounts.

rthaut avatar Feb 14 '24 21:02 rthaut

@rthaut It works for me as expected I noticed that the email for your calendar matches the one on your Cal account. Have you made any recent changes, or what's the issue you're trying to resolve?

CarinaWolli avatar Feb 14 '24 22:02 CarinaWolli

@CarinaWolli is there a support mechanism other than GitHub tickets for working through this? I don't want to clutter up this PR if it is simply a misconfiguration issue on my part...

@rthaut I noticed that the email for your calendar matches the one on your Cal account.

I don't understand how this could be. I have chosen my Event Types to go to calendars that are owned by other email addresses and are simply shared (via Google's Calendar sharing functionality) to the email address I use for my cal.com account.

Have you made any recent changes?

After your response I did try re-adding my target calendars directly (i.e. I gave cal.com access to each calendar by logging in with the appropriate email address), and updating the "Add to calendar" setting of the Event Types. However, even with that change all invites and emails are still just using my cal.com email address.

What's the issue you're trying to resolve?

I want certain Event Type links to create appointments on certain calendars. Additionally, I would like to avoid exposing the email address I use for cal.com to anyone scheduling events with me, and instead expose the email addresses associated those to the calendars.

My use case is that I sub-contract for several companies, most of whom provide me with a Google workspace account for their domain. Through those companies I have multiple clients who I work with directly on behalf of the companies for whom I sub-contract. I want all of my clients to see my availability in one place, but I want them to schedule to the calendar/domain to which they are a client. I especially don't want those clients to have any way of finding my private email address/domain.

rthaut avatar Feb 14 '24 22:02 rthaut

@rthaut Sounds specific, would be best to reach out to our support go.cal.com/support. And make sure to add all this information 🙏

CarinaWolli avatar Feb 14 '24 23:02 CarinaWolli

@rthaut just make sure to delete any old calendar integration and connect them again and then turn on the switch in the event type advanced settings. You would receive all the emails and events on the selected calendar and on the booking page also it would not mention your account's email

Udit-takkar avatar Feb 15 '24 06:02 Udit-takkar