cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rozey
Regular Visitor

Filtering Attachments

I am creating a flow that will save an attachment to a specific file location i have that working just fine,  what i am wondering is if there is a way to say only save the files i want based on extention.

 

For example a new email come's in that has two attachments one is a .pdf and the other is a .docx, is there a condition or switch or anything i could put in my flow to say i want to save the attachment that is a pdf to the file system but ignore the word document (.docx)

 

Any help would be wonderful.  Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Filtering Attachments

Hi @Rozey,

 

We could add a condition to check if the Attachment name contains the pdf, in the following way:

117.PNG

119.PNG

Doing in this way would only save the pdf file in the proper folder.

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Rozey
Regular Visitor

Re: Filtering Attachments

Also to add to this is there also a way to ignore email signatures, it seems like when i save attachments to the file system it will also save any images that are in a email signature.

Community Support
Community Support

Re: Filtering Attachments

Hi @Rozey,

 

We could add a condition to check if the Attachment name contains the pdf, in the following way:

117.PNG

119.PNG

Doing in this way would only save the pdf file in the proper folder.

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Rozey
Regular Visitor

Re: Filtering Attachments

This did work great for me i did expand it more and did advanced conditioning like this  ' @or(contains(item()?['Name'], 'pdf'), contains(item()?['Name'], 'docx'), contains(item()?['Name'], 'xlsx'), contains(item()?['Name'], 'zip'))  '  

 

just more info for anybody searching for the same solution

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,473)