Kindly explain what is expected if Step 3 does not contain data. Assuming run should be stopped
Logic looks fine. But based on your steps - there is no end point if data is available even after couple of loops
Create an integer variable i and assign the value as 0.
Create a boolean variable - boolContinueRun and set value as True
You can use a do while loop like below
DO
Increment i variable
Run Query
Get Interim Output
Based on interim output - compare and get actual output
If Output does not contain data OR i>4 (or the max loop expected)
Set boolContinueRun =false
1st run - step 2 will have data , based on that do the step 4
for 2nd run - if step 2 is not having data, stop the flow
else do for 3rd run the same thing - whatever output is there email to team
Create an integer variable i and assign the value as 0.
Create a boolean variable - boolContinueRun and set value as True
You can use a do while loop like below
Do
Increment i variable
Run Query
Get Interim Output
If interim output contains data
Compare and Get Output
Else
Set boolContinueRun=False
End If
If i=3
Send Email provided Output Contains data
Set variable boolContinueRun=False
End if