Search code examples
sharepointpower-automatepower-platform

"When a File is deleted" with Trigger condition and Folder defined will never get triggered


I have this flow which should run when a folder is deleted inside a folder inside sharePoint online document library:-

main.PNG

with those 2 trigger conditions for the IsFolder & Path, as follow:-

2cond.PNG

but the flow will never get executed/run.. i tried to remove one of the trigger conditions as follow:-

1cond.PNG

but still the flow will never run. any advice?


Solution

  • The conditions must be true.

    IsFolder and Equals are already methods returning true or false.

    So, you do not need to test @equals with true.

    Also, there is an error syntax in your condition: it's body/IsFolder and not body/{IsFolder}

    Condition should be:

    @triggerOutputs()?['body/IsFolder']
    

    The second condition to check a specific folder is already handled by the Folder parameter of the trigger.

    flow definition

    flow condition

    I test on my side:

    • when I'm deleting a file: no flow
    • when I'm deleting a folder outside the specific folder: no flow
    • when I'm deleting a subfolder inside the folder: flow is running!