-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Workflow — Send Email to Specific Email #14815
feat: Workflow — Send Email to Specific Email #14815
Conversation
@Amit91848 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
Graphite Automations"Add community label" took an action on this PR • (04/30/24)1 label was added to this PR based on Keith Williams's automation. "Add consumer team as reviewer" took an action on this PR • (04/30/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (05/13/24)1 reviewer was added to this PR based on Keith Williams's automation. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 One Page Changed SizeThe following page changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far, I left you some comments that need to be addressed first 🙏
And I think the implemenation for EMAIL_ADRESSE is missing in activateEventType.handler.ts
packages/trpc/server/routers/viewer/workflows/getVerifiedEmails.handler.ts
Show resolved
Hide resolved
|
||
export const getVerifiedEmailsHandler = async ({ ctx, input }: GetVerifiedEmailsOptions) => { | ||
const { user } = ctx; | ||
const verifiedEmails = await prisma.verifiedEmail.findMany({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a team workflow, I think it would be nice to show all emails of team members automatically as verified.
/*case WorkflowActions.EMAIL_ADDRESS: | ||
sendTo = step.sendTo || "";*/ | ||
case WorkflowActions.EMAIL_ADDRESS: | ||
sendTo = step.sendTo ? [step.sendTo] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a check to make sure that the sendTo email is actually verified. Also if it is a team workflow and we find that the email is verified for the user only let's add the team to the verifiedEmail as well.
That would solve the following issue:
Member1 has a user workflow and verifies an email to use in this workflow. Member1 creates a team workflow and uses the same email again which automatically shows as verified. Member2 tries to edit the team workflow but the email doesn't show as verified for them and they can't make any changes before they verify the email themselves
Made changes @CarinaWolli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/trpc/server/routers/viewer/workflows/update.handler.ts
Outdated
Show resolved
Hide resolved
For the |
Was already 0, tried with 1 also, still getting the same error |
did you restart the |
Yup still getting the same error Screen.Recording.2024-05-13.at.10.40.42.PM.movWorks if i comment this tho cal.com/apps/web/middleware.ts Line 169 in 56f31ee
|
…nd_email_to_specific_email
Made changes @CarinaWolli |
/*case WorkflowActions.EMAIL_ADDRESS: | ||
sendTo = step.sendTo || "";*/ | ||
case WorkflowActions.EMAIL_ADDRESS: | ||
await verifyEmailSender(newStep.sendTo || "", user.id, userWorkflow.teamId, ctx.prisma); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for added steps we only call it when we have bookings that need reminders scheduled. We should do it the same as we do for the edited steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah removed it from here and added when creating new step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, all issues are resolved and it is working as expected 🙏
* feat: Workflow — Send Email to Specific Email * disable button when verifyEmail pending * add verified emails table and routes * fix: include teamId in verifyEmailCode * fix: include email address in activate handler * fix: check team before adding email * feat: check verified email, add to team if only users * remove logs * fix: if statement Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> * change email to verify your email * fix: show error if saving unverified email * fix: show email in subject * verify email when editing steps * remove double calls from same block * verify email when creating new step --------- Co-authored-by: v0ltZzie <161201747+v0ltZzie@users.noreply.github.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
What does this PR do?
Fixes #14466
I don't have sendgrid account cannot show the email, instead showing the logs.
Screen.Recording.2024-04-30.at.10.17.05.PM.mov
Pending
Table for Verified Emails like there is of VerifiedNumberType of change
Mandatory Tasks