Gmail to Grive Integration

Hi,
Does Pipedream support Gmail to GDrive Integration. My requirement is to trigger a source when email with particular subject arrives and then the attachement should be saved to a GDrive folder. I have aleady done it using Appscript but hoping to find an easy inegration with Pipedream

Hi @kmrlpstase

Our direct Gmail integration is still waiting for approval by Google.

However, you can build the integration you’re looking in Pipedream without code.

1. Create a new workflow with an Email address as a trigger:

This will create a trigger with a unique email address.

2. Add the Pipedream email as a forward address.

Open Gmail and open the Settings by clicking the gear icon, then click See all Settings:

CleanShot 2022-07-27 at 09.55.07

Then select the Forwarding and POP/IMAP tab:

Click the Add a forwarding address and enter in your Pipedream email address:

You’ll be asked to confirm the address, click Proceed to continue:

CleanShot 2022-07-27 at 10.04.55

The final step is to confirm you own this Pipedream email address, so return to your Pipedream workflow where you created the email address, then select the new event and open the body of the email.

There you can copy & paste the confirmation link into your browser to verify you own the email address:

Sorry, the image was too large to share in a GIF directly, here’s a screenshot too:

After you open the link you’ll see a confirmation that your email has been verified:

3. Create a Gmail Filter to forward emails

Next, create a Gmail filter that will forward emails from your Gmail inbox to this new Pipedream email address.

Open Gmail and open the Settings by clicking the gear icon, then click See all Settings:

CleanShot 2022-07-27 at 09.55.07

Then in the top navigation bar, select Filters and Blocked Addresses:

Then scroll to the bottom of the page and click Create a new filter:

This will open a new menu at the top of the page, in your case type in this particular subject you want to monitor for, and check the Has Attachment checkbox. That way, the filter will only apply to incoming emails that contain an attachment and contain the relevant subject line.

Then click the blue Search button.

This will narrow down your emails to just this criteria.

If these filters are correct, then click the search options icon in the search bar and select Create filter:

CleanShot 2022-07-27 at 10.01.27

Under the Forward it to option, select your newly verified Pipedream email address from the dropdown:

CleanShot 2022-07-27 at 10.12.17

That’s it! :tada: You’ve just created a filter of emails that will trigger a Pipedream workflow.

Now you can use any of our pre-built actions to build an automated workflow from emails.

I would recommend using the Google Drive - Upload file action for your use case.

Hope this helps!

1 Like

Hi @pierce Thanks for your wonderful explanation.

Hi @pierce
Just one more help. I have received the email with attachment in PipeDream email. Now how do i download the attachment to tmp folder so that i can upload it to GDrive

EDIT : Found the Helper Function to download file to tmp

Everything is working fine now :+1:

1 Like

hi @kmrlpstase fantastic! :smiley:

So happy that was helpful to you. I didn’t realize how many steps were involved forwarding an email admittedly. But that’s amazing you were able to build out your flow on your own.

Please let us know if you have any more questions. Happy to help.

2 Likes

Gmail is now available on Pipedream

Does this mean that Gmail Trigger is now available in Pipedream

Hi @kmrlpst

First off, welcome to the Pipedream community. Happy to have you!

Yes! You can connect your Gmail account to Pipedream in two different ways now.

  1. Using the Gmail app
  • The simpliest option to send email with your own Gmail address from a Pipedream workflow

Start building workflows with Gmail here: https://pipedream.com/apps/gmail

  1. Using the Gmail Developer App
  • Requires some set up, but gives you the flexibility to trigger workflows from new emails to your inbox, gives you full access to automate your entire account.

Here’s the full tutorial to connect to Pipedream with the Gmail Developer App

Start building workflows with the Gmail Developer App here: https://pipedream.com/apps/gmail_custom_oauth