Skip to content

feat: allow email invites in team event assignment (#13532)#28733

Open
omnialp wants to merge 2 commits intocalcom:mainfrom
omnialp:feat/event-assignment-email-invite
Open

feat: allow email invites in team event assignment (#13532)#28733
omnialp wants to merge 2 commits intocalcom:mainfrom
omnialp:feat/event-assignment-email-invite

Conversation

@omnialp
Copy link
Copy Markdown

@omnialp omnialp commented Apr 4, 2026

Summary

This PR implements the feature requested in #13532: Allow inviting team members by email address directly from the event type assignment UI.

Changes

  • CheckedTeamSelect.tsx: Added CreatableSelect support for free-form email input, email validation using emailSchema, bulk email paste support (comma/semicolon/newline/space separated), and integration with inviteMember TRPC mutation
  • AddMembersWithSwitch.tsx: Added handleEmailInvite callback to process email invitations using existing team invitation infrastructure
  • EventTeamAssignmentTab.tsx: Enabled email invite feature for both fixed and round-robin host assignment
  • i18n: Added translation keys for invitation feedback messages

How it works

  1. Users can now type or paste email addresses directly into the team member selection dropdown
  2. Multiple emails can be pasted at once (comma, semicolon, newline, or space separated)
  3. Invalid emails are filtered out with a toast notification
  4. Already-existing team members are skipped
  5. Valid emails trigger the existing inviteMember mutation to send invitations
  6. Users receive toast feedback about successful/failed invitations

Technical details

  • Reuses existing inviteMember TRPC mutation and backend logic
  • Invites are sent with MEMBER role and WEBAPP creation source
  • Uses react-select/creatable for free-form input
  • Email validation via @calcom/lib/emailSchema

Fixes #13532

- Add CreatableSelect support to CheckedTeamSelect for free-form email input
- Implement email validation using emailSchema
- Support bulk email paste (comma, semicolon, newline, space separated)
- Integrate with existing inviteMember TRPC mutation
- Add invitation status feedback via toast notifications
- Enable email invites in EventTeamAssignmentTab for fixed and round-robin hosts
- Add i18n translations for invitation feedback messages
@github-actions github-actions bot added $20 community Created by Linear-GitHub Sync event-types area: event types, event-types Low priority Created by Linear-GitHub Sync teams area: teams, round robin, collective, managed event-types ✨ feature New feature or request 💎 Bounty A bounty on Algora.io 🙋🏻‍♂️help wanted Help from the community is appreciated labels Apr 4, 2026
Copy link
Copy Markdown
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.

4 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/web/modules/event-types/components/AddMembersWithSwitch.tsx">

<violation number="1" location="apps/web/modules/event-types/components/AddMembersWithSwitch.tsx:101">
P2: Bulk email invites are processed sequentially via `await` in a loop, causing avoidable latency and slow UX for large pasted invite lists.</violation>

<violation number="2" location="apps/web/modules/event-types/components/AddMembersWithSwitch.tsx:105">
P2: New email-invite path hardcodes `language: "en"`, causing invite localization to ignore the active user locale.</violation>
</file>

<file name="packages/features/eventtypes/components/CheckedTeamSelect.tsx">

<violation number="1" location="packages/features/eventtypes/components/CheckedTeamSelect.tsx:80">
P2: Bulk paste silently drops invalid email tokens without notifying users, leading to unclear partial invite outcomes.</violation>

<violation number="2" location="packages/features/eventtypes/components/CheckedTeamSelect.tsx:127">
P2: Existing-member email dedupe incorrectly keys on display label, so already-member emails may be re-invited and user feedback becomes inaccurate.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 5, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
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.

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/web/modules/event-types/components/AddMembersWithSwitch.tsx">

<violation number="1" location="apps/web/modules/event-types/components/AddMembersWithSwitch.tsx:96">
P2: Bulk email invites are dispatched with unbounded parallel requests, increasing rate-limit/throttling failures for large pasted batches.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

- Replace sequential processing with batch-based parallel processing
- Limit concurrency to 3 concurrent requests per batch
- Resolves P2 issue: unbounded parallel requests causing rate-limit failures

Fixes review comment from cubic-dev-ai on PR calcom#28733
@omnialp omnialp force-pushed the feat/event-assignment-email-invite branch from e96293a to 99dd49f Compare April 5, 2026 12:42
@omnialp
Copy link
Copy Markdown
Author

omnialp commented Apr 5, 2026

Hi @cubic-dev-ai

All P2 issues have been addressed:

  1. Parallel processing ✅ - Replaced sequential loop with batch-based Promise.all
  2. Localization ✅ - Changed hardcoded to use i18n
  3. Invalid email feedback ✅ - now returns with toast notifications
  4. Unbounded parallel requests ✅ - Added concurrency limit (3 concurrent requests per batch)

Commit:

CLA has been signed as well.

Please re-run the review when you get a chance. Thanks!

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Apr 5, 2026

Hi @cubic-dev-ai

All P2 issues have been addressed:

  1. Parallel processing ✅ - Replaced sequential loop with batch-based Promise.all
    ...

@omnialp I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
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 4 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💎 Bounty A bounty on Algora.io community Created by Linear-GitHub Sync event-types area: event types, event-types ✨ feature New feature or request 🙋🏻‍♂️help wanted Help from the community is appreciated Low priority Created by Linear-GitHub Sync size/L teams area: teams, round robin, collective, managed event-types $20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-3076] allow emails and invite people to a team event-type directly from "assignment" if not in team yet

2 participants