Question

How do I exclude a specific attachment type in a "New Attachment" trigger in Gmail?

  • 7 April 2024
  • 3 replies
  • 16 views

Userlevel 2
Badge

I have a trigger/ action set up for a gmail to gmail zap. The trigger is set to ‘New Attachment’ and the action is set to ‘Send Email’. The email I am sending needs to include the CSV attachment, but my zap is also sending a logo that comes in as an attachment too.

Can I make it so the logo attachment won’t send, but the CSV will?


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

3 replies

Userlevel 7
Badge +6

Hi @ababab608,

You can probably add a Filter By Zapier step after the trigger. This way the Zap will only continue on .CSV files and not include the logo. Here’s an example:

6cdbcca81e23324c5873738b4fe29d93.png
(view larger)

Kindly give it a try and let me know how it goes? I'll keep an eye out for your response!

Userlevel 2
Badge

 Thanks @ken.a Adding the filter was simple and I thought it would work. When I tested it it also only sent the CSV file. I thought I was in the clear… When my Zap ran in real time this morning, gmail still sent both the image and the CSV. Can you tell id I did something incorrectly?

 

I feel like it is still recognizing both attachments and passing them each through.

 

Please note, that I just noticed in my ACTION steps I only had ‘Attachments Exist but not shown’ selected. I just added ‘Continue only if true’. So this may do the trick. Please let me know if I am missing something or might need to do something else. Thank you!

 

 

Userlevel 7
Badge +6

Hi @ababab608,

Thanks for giving that a try!

I think the “Attachments Mime File Type” data also includes the file type of the other attachment in the payload. With this, could you please try using the “Attachments Filename” instead? Like so:

32ea74c85145c24460e1381ec6ccd6c9.png
(view larger)

Additionally, the “Attachment” field only accepts file data. I’d recommend removing the mapped “Continue only if true” to avoid complications with the Zap.

Kindly give it a try and let me know how it goes? I'll keep an eye out for your response!