Best answer

Create Dropbox folders from new Gmail attachments based on sender name - check if the folder exists, first

  • 3 August 2021
  • 4 replies
  • 74 views

I’m trying to do the following:

Gmail email is received and has attachment(s)
A new folder is created in Dropbox
This folder is named: Senders name-Subject Line
Attachments will go in the folder that was just created.

 

Thanks in advance for the help.

icon

Best answer by Troy Tessalone 3 August 2021, 18:17

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.

4 replies

Userlevel 7
Badge +9

Hi @SS7 

Since you already have a good idea of what to do, you should just go ahead and start creating the zap, it should be straightforward to do. You can use this template to get started: https://zapier.com/webintent/create-zap?template=166

If you get stuck anywhere, provide screenshot so that we can understand the case better.

Userlevel 7
Badge +14

Hi @SS7 

Try this...

Zap Steps

  1. Trigger: Gmail - New Attachment
  2. Action: Dropbox - Find Folder
  3. Action: Paths
  4. Action: Path A - Filter (Folder Does NOT Exists)
  5. Action: Path A - Dropbox - Create Folder
  6. Action: Path A - Dropbox - Upload File
  7. Action: Path B - Filter (Folder Exists)
  8. Action: Path B - Dropbox - Upload File

 

NOTE: If you use GDrive instead of Dropbox, then you can do w/o the Paths and use a Find/Create Folder step.

Ok… got it working BUT it’s creating multiple folders.

First I sent an email with two attachments.

 

It created the folder but because there were two attachments, it created two different folders.  I need all attachments from one email to go in one folders.  Often, a customer will send 10 - 20 pictures in one email.

 

This is what my step 3 looks like.  Is there anything I can change here to tell the zap to place them in one folder?

Userlevel 7
Badge +12

If the Zap is creating a new folder each time, that suggests that it’s not finding the one it created for the first attachment for some reason. Looking at the names of the folders in your screenshot, it looks like the Zap is searching for the same folder name but not finding the folder it just created. That suggests that it’s trying to look for the new folder before it’s available ie each attachment is being processed too quickly. 

 

Try adding a ‘Delay after queue’ step (the app is called ‘Delay by Zapier’) after the trigger and before the find folder step. This will effectively tell the Zap to wait a moment between each Zap run (each attachment on the email) before continuing. That means that the find folder step should find any existing folders and therefore use the ‘Folder exists’ path. 

 

Let us know how you get on!