Skip to main content

Hello and thank you in advance for any and all help 🙂 !!!

I have a simple Zap that I want to take a CSV file from a Gmail account and upload it to Dropbox. This is working “correctly” but I am using way too many “tasks” because the system is uploading all the parts of the email into Dropbox as .unknown files for things like message headers, body, signature images, etc. and is not using only the attached file (which is a CSV) to upload. For each CSV (which does get uploaded correctly), I also get 6 other “garbage/.unknown” files as well and use 7 tasks instead of just 1. I am already over my limit and getting charged per task - PLEASE HELP, hahaha!


How do I “fix” this correctly? My first attempt was to edit the Dropbox (action) end and specify csv files, but all that did was cause it to upload all the .unknown files into Dropbox as .csv files and did not solve my problem. Then I tried to specify the file by name in the “Name” and “Specify Name” fields in the Dropbox configuration, but somehow all that did was cause it to create a filename.cvs.txt file???? And also still use 7 “tasks” to complete this??? What the heck?

My initial settings for the “File” field in the Dropbox settings that creates the 7 files (one CSV and 6 garbage files) is set to one of the selections on the dropdown with a Gmail logo and 1. Attachment: (Exists but not shown). Oddly, I do not see the CSV listed in the dropdown of options that populates that box *

I do not see any settings on the Trigger/Gmail side that will specify the attachment, but maybe I am missing something?


Please help, I am really struggling to figure out how to correctly configure the Gmail/Attachment trigger and/or the Dropbox action to only grab the actual CSV attachment to pass on and stop all the unwanted uploads/tasks that are getting expensive quickly as I have to run this process about 30 times per day (Yikes). 
 

Any thoughts and advice appreciated!!!

Hi ​@Terrapin 

Add a Filter as Zap step 2: https://zapier.com/apps/filter/help

Filter condition: Attachment Details Mime Type contains text/csv

NOTE: Make sure to select the variable with “Attachment” (SINGULAR).

 


Thank you so much for replying!!

I just tried that, but it is telling me “Your Zap would not have continued for this test data”…

Am I doing something wrong here?

 

 


@Terrapin 

Scroll down to see the full details in the yellow warning.

It is likely because the example record you selected from Zap step 1 has a variable value that does not match the filter condition.

e.g. image/png does not contain csv

 


Hi Troy, thank you! You are my only lifeline on this at the moment. 

 

You are totally correct….

 

My confusion seems to be that my attachment in the email is indeed a CSV, but the only option from the dropdown to select for “Insert Data” is “Attachment Details Mime Type image/png” there is no option for “Attachment Details Mime Type csv” 

 

 

So I select that and it appears in the next window as just “Attachment Details Mime Type

 

But then I get the error message “Items that didn’t match” in yellow. I am confused, how do I set the filter to be for CSV if I have to choose Attachment Details Mime Type image/png

 


@Terrapin 

Using an example from the screenshot below.

The variable label is: Attachment Details Mime Type

The variable value is: image/png

 

NOTE: Make sure you have selected the variable with “Attachment” (SINGULAR)!

 

Each time the Zap runs, the variable value will change to whatever is returned from Gmail.

 

Try turning the Zap ON and testing live, then check your Zap Runs history details to see the DATA IN/OUT for each step to help you trace the data flow and troubleshoot: https://zapier.com/app/history/


Hi Troy, 

 

This Zap is already live and uploading the CSV along with the other 6 garbage files that are the issue  and I can look at the history and data in/out and I see this…

 

as well as this… 

I am not sure why it says it uploaded 1 file when it actually uploaded 7 and charged me 7 tasks.

I will test the new filter live but I am still confused on this screen if the filter is saying Mime Type must contain CSV, why is the error in yellow telling me it did not match image/png? What am i misunderstanding here? It this screen below not telling Zapier to continue if attachment is a CSV? From the history above (and the actual email I have access to) the attachment is indeed a CSV.

 

Sorry if I am just stupid, but this is not making sense to me:  
1. set filter to test for mime type CSV
2. run test against email (with known CSV attached)
3. get error that it does not match mime type png (why would it when we told it to look for csv not png?) Why does it still care about png?

 


Hmm I duplicated my zap to test this out and it may be working (the filter)! I am still unclear on the questions above but really just need this to work, haha. I run the process every 30 minutes and can confirm the fix in about 20 minutes. Fingers crossed!


Hi there, ​@Terrapin! 👋

I am not sure why it says it uploaded 1 file when it actually uploaded 7 and charged me 7 tasks.

The Gmail New Attachment trigger will run for each attachment separately. So if there were 7 attachments present in a single email then the Zap would trigger for each of those separately and upload each individual attachment. That filter you added though will ensure that going forward the Zap will only upload attachments that are actually CSV files. So next time the Zap sees an email with 6 images and 1 CSV file attached only 1 task would be used.

Sorry if I am just stupid, but this is not making sense to me:  
1. set filter to test for mime type CSV
2. run test against email (with known CSV attached)
3. get error that it does not match mime type png (why would it when we told it to look for csv not png?) Why does it still care about png?

You’re not stupid at all! It’s more of a warning message than an error. It’s trying to let you know that if the Zap had triggered for the attachment (which appears to have been a png image) in the currently selected email test record, the Zap run would have been halted, and the file would not have been uploaded. 

Those attachments that have a mime type of png could be images that have been included in the footer of the email. For example if someone has an image of their logo or social media icons included in the footer of their email they might be seen as attachments on the email as well.

Hope that helps to clarify things. Please do keep us updated on how you get on with the duplicate Zap, keen to ensure you’re all set! 


Thank you Sam and Troy for all of your assistance and help with this issue! I was really having a hard time making sense of things but the filter worked and it is functioning exactly as I needed!! This community is awesome and you both deserve my gratitude!

For anyone else looking to solve this problem, yes a filter is the way to go. Here is my Zap…

 

 

Which is now uploading only the CSV because of this filter setting…

 

 

It may throw the “warning” in yellow when you test as it did for me (which threw me off), but it works exactly as hoped and I am getting just the one, clean CSV in my Dropbox.

Thanks again for the help!!!


You’re very welcome, ​@Terrapin​—thanks for your kind words! 😊 I’m so pleased the filter is working well.

Really appreciate you following up to share the filter setup you used—it’s contributions like this that help keep this Community so awesome! 🧡


Reply