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


Report
All responses (
Answers (