diff --git a/packages/pieces/community/gmail/package.json b/packages/pieces/community/gmail/package.json index c4f4f27f09..e8cf15ed4b 100644 --- a/packages/pieces/community/gmail/package.json +++ b/packages/pieces/community/gmail/package.json @@ -1,4 +1,4 @@ { "name": "@activepieces/piece-gmail", - "version": "0.5.6" -} \ No newline at end of file + "version": "0.5.7" +} diff --git a/packages/pieces/community/gmail/src/index.ts b/packages/pieces/community/gmail/src/index.ts index fd45cce245..25411c8ffa 100644 --- a/packages/pieces/community/gmail/src/index.ts +++ b/packages/pieces/community/gmail/src/index.ts @@ -6,6 +6,7 @@ import { } from '@activepieces/pieces-framework'; import { PieceCategory } from '@activepieces/shared'; import { gmailSendEmailAction } from './lib/actions/send-email-action'; +import { gmailNewEmailTrigger } from './lib/triggers/new-email'; export const gmailAuth = PieceAuth.OAuth2({ description: '', @@ -13,8 +14,10 @@ export const gmailAuth = PieceAuth.OAuth2({ authUrl: 'https://accounts.google.com/o/oauth2/auth', tokenUrl: 'https://oauth2.googleapis.com/token', required: true, - // TODO add https://www.googleapis.com/auth/gmail.readonly when we have the permission - scope: ['https://www.googleapis.com/auth/gmail.send', 'email'], + scope: [ + 'https://www.googleapis.com/auth/gmail.send', + 'https://www.googleapis.com/auth/gmail.readonly', + ], }); export const gmail = createPiece({ @@ -37,7 +40,17 @@ export const gmail = createPiece({ displayName: 'Gmail', description: 'Email service by Google', - authors: ["kanarelo","abdullahranginwala","BastienMe","Salem-Alaa","kishanprmr","MoShizzle","AbdulTheActivePiecer","khaledmashaly","abuaboud"], - triggers: [], + authors: [ + 'kanarelo', + 'abdullahranginwala', + 'BastienMe', + 'Salem-Alaa', + 'kishanprmr', + 'MoShizzle', + 'AbdulTheActivePiecer', + 'khaledmashaly', + 'abuaboud', + ], + triggers: [gmailNewEmailTrigger], auth: gmailAuth, });