Skip to main content

Hi All, I built a giant automation bot that parses our attachments and sends them each down their merry path based on the name of the attachment. It’s really easy because in each case, the attachment dictates the path. however, in almost all cases, i may have multiple attachments with different content with the same exact file name & the gmail attachment trigger in zappier is deduping based on the file name & ignoring everything else even though bytes and timestamps are different. This basically invalidates everything received after the gmail attachment trigger. I see mention of an “allow duplicates” feature via some googling but i don’t see that feature. Do you have any recommendations on how i can allow these “duplicates”? Please note that this is coming from an automated server, so i have no way of asking the filenames to be changed to be unique.

Hi ​@moondaylabs 

For us to have more context, post screenshots the outline the “duplicate” examples you are referring to.

 

If you want to submit feedback or a feature request to be logged, you can open a ticket with Zapier Support: https://zapier.com/app/get-help


Thanks, ​@Troy Tessalone ! Here is an example. The only difference is each day, my attachments come w/ the date, everything else remains the same in terms of “Initiation Letter” - so i have 5 attachments w/ their name & the date.

 


@moondaylabs 

Zap trigger: Gmail - New Attachment

Description: Triggers when you receive a new attachment

Since the file names are different (and those come in different emails), those should trigger unique Zap Runs.

 

If you are still having issues, provide more specific details about the issue along with screenshots with how your Zap steps are outlined and configured in EDIT mode with the field mappings visible.

 


thanks, ​@Troy Tessalone but that’s exactly the problem, the names are not unique. on any given day, i receive 5-10 attachments, for example all labeled “Initiation_Letters_06/27/2025.pdf”

If i pull them down, save them each as “Initiation_Letters_06/27/2025.pdf_1”, “Initiation_Letters_06/27/2025.pdf_2”, “Initiation_Letters_06/27/2025.pdf_etc”, the Zapier but does its thing. But because I have them all coming through as the Zap only processes the first one & continues on (part 1 & part 2 of 5 below):

 

 

 

In regards to setup, it’s just a basic attachment trigger for the appropriate inbox:

 

 

All the subsequent steps work fine if i:

  1. only have 1 attachment 
  2. save each file with a specific name

 

But because i can get 10 daily notifications w/ nothing other than Notification_(DATE), Zapier doesn’t appear to be processing the subsequent files as attachments. Also, as the system that generates these files is happing externally, i cant ask for a timestamp to be appended to each file name.


@moondaylabs 

Try a different approach…

  1. Trigger: Gmail - New Email Matching Search
  2. Action: Filter
    1. TBD if you need this to help filter the data from Gmail to process
    2. Help: https://zapier.com/apps/filter/integrations#help
  3. Action: Looping - Create Loop from Line Items
    1. Use to handle the array of items for the Attachments and their data points
    2. Help: https://zapier.com/apps/looping/integrations#help
  4. Action: cUP TO YOU]

thanks again, ​@Troy Tessalone - this is actually where i started and ran into the same issue. my loops were still grabbing the first file, so i had 7 initiations for 7 attachments, but processing only the first attachment. forums, googling, and gpt guidance sent me to the attachment trigger, but the issues seem identical. i have a ticket open w/ support where it was indicated attachment triggers use an attachment ID, but if that were true then the identical names notion wouldn’t be disproven by my way of my naming adjustments. i’d hate to go down this path, but do you think a Code to Gmail API might be the next best step?


@moondaylabs 

Help links for Looping: https://zapier.com/apps/looping/integrations#help

When manually testing looping only the first loop iteration will be used.

We would need to see screenshots with how your Zap steps are outlined and configured using the “Looping” approach for us to have full context to be able to evaluate and advise.

 


Appreciate your help, ​@Troy Tessalone ! just an FYI I’ve opened a ticket WRT the Gmail Has Attachment and that is not the expected behavior, so support is taking a look at that. I’d rather make sure I’ve exhausted that avenue before proceeding w/ the Loop approach as I find it to be a more elegant solution. Will keep you posted!


Hi ​@moondaylabs,

 

No worries, just keep us posted on the development of the ticket. So we can assist you further if needed. Thank you.


thanks again for your help ​@Troy Tessalone  & ​@JammerS . Just heard back from Zapier support that indeed multiple attachments w/ the same name in an attachment would not trigger “has attachment” as intended. They’ve filed a ticket but are unable to provide a timeline as it’s been characterized as a feature request & not a bug.

Till then, & given the importance of maintaining my only client, I’m thinking I can try a different approach, which would be New Gmail > All Attachments > Upload to Dropbox > New File added to Dropbox

If interested, I will report back on my progress & the ticket status.


@moondaylabs 

I’d recommend using the Looping approach.

 

Try a different approach…

  1. Trigger: Gmail - New Email Matching Search
  2. Action: Filter
    1. TBD if you need this to help filter the data from Gmail to process
    2. Help: https://zapier.com/apps/filter/integrations#help
  3. Action: Looping - Create Loop from Line Items
    1. Use to handle the array of items for the Attachments and their data points
    2. Help: https://zapier.com/apps/looping/integrations#help
  4. Action: iUP TO YOU]

@Troy Tessalone trying that but it appears stuck on the first one now. here is my looping config for a file i got this morning w/ 17 attachments of the same name:
 

Then here is my following step w/ the first loop selected:
 

 

I do not have any subsequent filtering happening:

 

 


@moondaylabs 

Give this a try since the Gmail trigger returns each Attachment individually rather than as part of an array of items.

 

See screenshots.

 

Formatter > Text > Default Value

Configure the MAX variables all separated by a pipe: |

 

Then use this action: Looping - Create Loop from Text

Set the Text Delimiter as: |

 

 

EXAMPLE: Looping Output

 


that’s the ticket! thank you SO much, ​@Troy Tessalone ! Looks good, processed 17 status updates via one Zap, 17 loops. Please let me know if you’d like updates when I hear back on the completion of the Attachment trigger re: multiple files, if not have a lovely day!


Hi ​@moondaylabs,
 
We just wanted to see how everything is going with your Zap. Did Troy's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


Thanks, ​@JammerS ! It does, short of one caveat…

I never know how many attachments I’m going to get. Could be 2, could be 20. In the example I sent yesterday, I received 17, so I updated the Zap to account for 17. Today I received 10, resulting in 7 extra runs based on the 17 would be attachments, where 7 runs halted due to lack of files between the pipes. Is there a way to have the Zap intelligently cap to run as this is going to inflate my Zap costs?


@moondaylabs 

You can add N “attachment” variables to hopefully cover the MAX email attachment files you will receive.

Help for how to do custom pill mapping: 

 

You should add a Filter step after the Looping step to make sure the Looping iteration returned a value to process.

Filter help: https://zapier.com/apps/filter/integrations#help

 

NOTES:

  • These apps count as 0 Tasks in Zap Runs
    • Looping
    • Filter
    • OTHERS: 

       


Thanks! Super helpful. I’ve created 25 based on that help doc:
 

I’ve also created a filter step to only proceed if the output includes “https://” in the file output from the previous step.

 

Also, the reason my paths were throwing errors was because they were contingent upon the file *name* being triggered in the first step. I know that seems counter-intuitive, but this is the only way I could get it to read from the PDF name, as my looping logic subsequently hosts the PDFs on zapier URLs w/ unique names. and because my emails (with multiple attachments) will all only ever have one file name, it wouldn’t cause conflict downstream. but when it gets to the next step that needs to process the file. So that’s why the path step works, but the subsequent step fails:

The filter upstream you advised me on should do it. thanks again! :) 


Wow! Thank you for confirming that Troy’s resolution got the Zap running. This will significantly help our Community members to have as a reference for the same issue.


Reply