How to filter attachment and choose only pdf

Hi!
I am migrating from Zapier and I cannot find the way to use a filter option for this automatization.

this is the autom. I am trying to replicate:

  1. New labeled email (when an email is labeled as “supplier email with invoice”)
  2. Find the pdf in the email(it is an invoice that is automatically sent to me)
  3. Upload the pdf to a folder in drive (my pdf invoice is uploaded to a invoice folder in my drive)

The problem is in the step 2. If i don’t filter, all the images from the company logos inserted in the email will be uploaded as well as the pdf and this is annoying as I will have to manually delete them from the folder.

Any advice on this?? In Zapier i was using the mime type filter.
In here I am asking the AI to write the code but it says error.

Thanks!

Hi @Paloma_Alma

I think we should add new feature in the Files Helper to check the file type, but how did you do it in zapier? If you have screenshot that would be great!

Hi!
I am using a filter, as shown in the screenshot attached. And it is also important that it keeps the name of the file when uploading it.

Thanks