-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
7417 workflows i can send emails using the email account #7431
Merged
martmull
merged 22 commits into
main
from
7417-workflows-i-can-send-emails-using-the-email-account
Oct 8, 2024
Merged
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
05fc02c
Ask for gmail provider in send-email action
martmull 2ad87b4
Update gmail sdk scopes
martmull b186b09
Remove useless email
martmull 4971a2e
Add select connectedAccountId
martmull b7a397a
Update email action settings
martmull fd46298
Handle case when connectedAccount does not belong to currentWorkspace…
martmull 5bfb2ff
WIP: add 'Add account' button
martmull 6693f2c
Add scopes to connected account workspace entity
martmull 9aa36f5
Wip: store scopes in connected accounts
martmull 2a0829e
Use scopes in workflow page
martmull fdde163
Fix issue
martmull 8488c7b
Refactor
martmull 52e0b54
Fix lint
martmull 6619cb8
Greptile review
martmull 4697bb0
Add log for email sent
martmull 0c1d0c8
Merge branch 'main' into 7417-workflows-i-can-send-emails-using-the-e…
martmull f053d52
Add feature flag for gmail scopes
martmull 7c2cc7e
Add specific exception when connected account not found
martmull abdbd52
Fix check schopes
martmull 80e0d4a
Merge branch 'main' into 7417-workflows-i-can-send-emails-using-the-e…
martmull 00fb346
Add loginHint when asking for new scopes
martmull 33b2989
Merge branch 'main' into 7417-workflows-i-can-send-emails-using-the-e…
martmull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 0 additions & 29 deletions
29
packages/twenty-emails/src/emails/workflow-action.email.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/twenty-server/src/modules/mail-sender/exceptions/mail-sender.exception.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { CustomException } from 'src/utils/custom-exception'; | ||
|
||
export class MailSenderException extends CustomException { | ||
code: MailSenderExceptionCode; | ||
martmull marked this conversation as resolved.
Show resolved
Hide resolved
|
||
constructor(message: string, code: MailSenderExceptionCode) { | ||
super(message, code); | ||
} | ||
} | ||
|
||
export enum MailSenderExceptionCode { | ||
PROVIDER_NOT_SUPPORTED = 'PROVIDER_NOT_SUPPORTED', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we will need to put that behind a feature flag as we will need to go through the google approval process and it can take up to a month. We will be able to test with a short list of accounts in the meantime and will need the flag :)
Also it's likely that we will need to have a process to ask users to reconnect their account if we detect that the scope is missing (maybe when we try to send an email and get a 403 the first time) We already have similar mechanism for messaging sync