Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Condition after Get Files (Properties only) is acting very strange.

I have the following data file.


The objective is to check a folder to see if there is a file exists ie. Polly.pdf.

If the file is not there - then the flow is to generate a pdf (I need to ensure I only create the file once .. ever)

I have put a Post message in chat so that I can follow which route the flow in going in.  

What I cant understand is that its is doing some of Condition = True and Some of Condition = false.


Can anyone clarify

Here is my flow

Get files (with filter on filename.pdf)

Condition = length(outputs('Get_files_(properties_only)')?['body/value'])  <> 0

If True (ie file exists) - Post a message = File found - take no action

If false - Post a message - File not found - Generate the pdf.






The folder is empty at first so the first run through Get file will be 0

Polly1 returns - Polly1 not found & file is generate

Polly2 returns - Polly 2 found and still generates the files (note Polly2 isnt in the folder)

Polly3 returns - Polly 2 found and still generates the files (note Polly2 isnt in the folder)

and so on as shown below.



But it still creates the files 




How can it does a bit of one condition and a bit of the other.


Im very new to Power Automate so not sure what is going on.  There is no Generate file If the file has been found.


DO i need to clear length(outputs('Get_files_(properties_only)')? or something like that before it loops round again?  Im guessing now!  

Would appreciate any help




Helpful resources

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,292)