📧 Gmail New Email Trigger is Now Available!

Hi Activepiecers,

:tada: Today we are celebrating that we received the CASA Security Certification and got approval to read emails from Google in our app.

You can use the New Email Trigger by using the Gmail Piece. For those who already have a Gmail connection, please reconnect your account.

There is no longer a need to connect to Gmail using IMAP. :grinning:

I would love to hear your use cases and feedback!

Until next time,
Mo. :sparkles:

8 Likes

What a HUGE enhancement for our flows and use cases, I can’t believe it’s now available! Congrats!!

2 Likes

Reconnecting the account means deleting the connection and connecting again?

I’m afraid that I will have to manually review all the flows that I have with Gmail pieces one by one to make sure nothing got lost in the process.

If I’m not planning to use the new functionality for Gmail, can I leave it as it is ??

Thanks!

No, @Eduardo just click on Reconnect like in this screenshot (but of course for Gmail):

And if you don’t want to use this functionality, you don’t have to change anything.

2 Likes

@abuaboud
I was planning to use the New Email Triiger.

Any information on this below post?

Creating New Gmail Connection with ClientID and ClientSecret?

@abuaboud - can you confirm the following?

As a non-dev, I’m trying to understand the benefits of this update, so I asked Gemini: “Give me 5 concrete automation examples (so triggers + actions) what’s possible with GMAIL API and not with IMAP”

Here’s what I got:

Here are 5 concrete automation examples possible with Gmail API and not with specifically within the context of Activepieces (or similar automation platforms):

1. Priority Email Notifications:

  • Trigger: New email arrives in Gmail with the word “Urgent” in the subject line AND sent from a specific VIP contact.
  • Action: Send a text message notification to the user’s phone through Activepieces, highlighting the sender and subject.

IMAP Limitation: IMAP can only trigger on any new email, not with specific content or sender filters.

2. Automated Task Creation from Emails:

  • Trigger: New email arrives in a specific Gmail label like “Project X” AND contains the phrase “Action Required:”.
  • Action: Create a new task in a project management tool (e.g., Asana, Trello) via their API integrations available in Activepieces, extracting the task details from the email body.

IMAP Limitation: IMAP cannot understand content within the email to extract specific information for actions.

3. Smart Email Filtering & Labeling:

  • Trigger: New email arrives from an unknown sender BUT contains keywords related to a specific project.
  • Action: Automatically apply a Gmail label (e.g., “Potential Leads”) and move the email to a specific folder using the Gmail API.

IMAP Limitation: IMAP lacks the ability to analyze email content for dynamic filtering and actions.

4. Out-of-Office Reply Based on Content:

  • Trigger: New email arrives while the user has an out-of-office status set in Gmail.
  • Action: If the email contains urgent keywords (e.g., “critical issue,” “ASAP”), use the Gmail API to send a customized out-of-office reply with emergency contact information. If not, send the standard out-of-office message.

IMAP Limitation: IMAP cannot dynamically adjust out-of-office replies based on email content.

5. Automated Email Forwarding with Modifications:

  • Trigger: Receive an email with attachments in a specific Gmail folder (e.g., “Receipts”).
  • Action: Forward the email to an expense management software (e.g., Expensify) using their API integration in Activepieces. Before forwarding, use the Gmail API to add a subject line prefix like “Expense Report:” for better organization.

IMAP Limitation: IMAP cannot modify email content before forwarding.

Is this correct? :slightly_smiling_face:

I have a use case which involves parsing a PDF attachment to an email. Is this possible?

1 Like

Were you able to get help on parsing a PDF attachment to an email?

1 Like

Nope. It doesn’t seem to offer the attachment on the next step like it does with the IMAP route.

1 Like

@kishanprmr Can you look into attachments?

2 Likes

@here

Attachments is now added to the body by @kishanprmr

2 Likes

Anyone have a good tutorial on how to save down gmail attachments? Still can’t figure it out.

2 Likes

Same! I cant figure out which mapping field needs to be used lol… #Devless

1 Like

Hello @Jimmy_Martin @Spaz ,

You can find the attachments field in the output of the ‘New Email’ trigger. Expand the ‘message’ field, and you will find the ‘attachments’ property, which contains the URL for each attachment.

Found it, thank you!

@kishanprmr Thank you for that!

Sorry for the newbie questions. After adding the attachment field and forwarding it out in my flow it seems to not be formatted correctly as it wont open.

Am I doing something wrong?
Screenshot 2024-07-02 105331

1 Like

@Jimmy_Martin In the attachments field for the “New Email” trigger, it contains data and fileName properties, as shown in the image.

image

When you pass these attachments to the “Send Email” action, make sure you fill the “Attachment” and “Attachment Name” fields, as shown in the image.

This will add the attachment with the correct file name.

image

1 Like