cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MohammedShaban
Frequent Visitor

Writing filter query in 'Get files (Properties only)'

I have created a Flow to get the Files from a Folder in sharepoint. This folder contains all the files with extensions like .pdf,.xlsx and .eml(referring to emails). Now in the Action Get files (Properties only), I need to write a Filter query to get all the Files except for .eml extension. 

 

I am not sure on how to write it. Need help

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey @MohammedShaban 

 

You use the Filter Array and leave out the '.eml'- See - https://powerusers.microsoft.com/t5/Using-Flows/Sharepoint-filter-by-file-type-extension/td-p/192353 

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

View solution in original post

2 REPLIES 2
CFernandes
Super User
Super User

Hey @MohammedShaban 

 

You use the Filter Array and leave out the '.eml'- See - https://powerusers.microsoft.com/t5/Using-Flows/Sharepoint-filter-by-file-type-extension/td-p/192353 

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

MohammedShaban
Frequent Visitor

@CFernandes Thank you, I am able to get only the files with the required extension.

Once I pass the value in apply to each it gives me an error "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')' is of type 'Object'. The result must be a valid array" I tried taking a compose action and in the array function passed the item from the Filter array but still seeing the same error.

 

MohammedShaban_0-1650366273326.png

MohammedShaban_1-1650366390287.png

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,866)