Best answer

Upload email attachments from Gmail to Google Drive

  • 13 August 2020
  • 5 replies
  • 367 views

Userlevel 1

Hello everyone, 

I receive a lot of emails with attachments every day. I wanted to automate this with Zapier, so that as soon as an email arrives, a folder is created on Google Drive with the name of the sender, and the attachment from the email is stored in it. 

Can anyone help me with this?

I would be very happy!

Thanks a lot

Greetings Bayram

icon

Best answer by Danvers 24 August 2020, 12:55

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 4
Badge +5

Hey! My name is Justin and I write for the Zapier blog. Nice to meet you!

You can absolutely set that up. Here’s a video tutorial by my friend Joey talking you through most of the process: https://zapier.com/apps/google-drive/tutorials/save-gmail-emails-to-google-drive

The folder part gets tricky. I would do this in a few steps after the filter stage.

  1. Use the “Create folder” action in Google Drive to create a new folder using the name of the email sender.
  2. Use a delay step, for five minutes, to give the folder a chance to exist before the next step runs
  3. Use the “Find Folder” search to find the folder you just created
  4. Point the Upload step to this folder.

Does that make sense? It’s going to be a bit of work, and will use up tasks. If I were you I’d probably just put all the attachments in the same folder, but if this is a must the steps above should work. Good luck!

Userlevel 7
Badge +14
  1. Trigger: Gmail - New Attachment (Triggers when you receive a new attachment (triggers once per attachment))
  2. Action: GDrive - Find or Create Folder
  3. Action: GDrive - Upload File
Userlevel 1

Many thanks for the helpful answers. For a mail with 1 attachment this works perfectly. But if you have 2 attachments, it creates 2 folders and saves one attachment in 1 folder.

How can I make sure that all attachments are saved in the same folder?

 

Userlevel 1

Many thanks for the helpful answers. For a mail with 1 attachment this works perfectly. But if you have 2 attachments, it creates 2 folders and saves one attachment in 1 folder.

How can I make sure that all attachments are saved in the same folder?

 

I’m trying to work this out also! Would be great if someone has a solution.
I’m trying to go a little further and then do separate things with these attachments once they have been uploaded.

Userlevel 7
Badge +12

@byrm In the Find or Create folder step, if you use the something that’s common to both attachments then the first attachment would create a new folder and subsequent attachments should be put into the same folder. In other words, the first attachment would create a new folder and for the other attachments the Zap will find the folder and add the attachments in there. 

 

If you’ve tried that and it didn’t work, try adding a Delay step using the ‘Delay after Queue’ option. This will slow the Zap down a little so that there’s enough time for the folder to be created before the other attachments come through. 

 

@LewisWaters It depends on what you’d like to do with the different attachments. If you want to perform the same actions with each one, then the solution above should work. If you want to perform different actions depending on the attachment then Paths could an option (although it depends what Zapier plan you’re on). If what you’re looking to do is more complex than that, I’d recommend starting a new post in the Community to explain exactly what you’re looking to do so that folks can focus on finding the best solution for what you’re looking to do.