Showing results for 
Search instead for 
Did you mean: 
New Member

Flow that triggers on both files and folders

I'm sharing a few folders with externals and I need to be able to see when new files are uploaded.


In order to solve this, I'm currently running a flow which triggers when a file is being created in a specific folder using "When file is created in folder"-trigger. However, sometimes these externals instead create folders within my folder and put their files there instead of in the folder which my flow covers. This means my flow doesn't trigger since it's not a file that was created, but a folder (with files placed in it). I've been trying to create a flow which covers both files and folders, so that it triggers on either one being create. This is probably and easy thing, but I havn't been able to manage.


Any help would be appriciated!

Super User
Super User

Hi @Sagebro 

You just need to tweek little on the configuration and some condition check before proceeding with the actual logic when the file is created.

1. Make sure to use the trigger 'When a file is created (properties only)' and configure only the 'Site Address' and 'Library Name'. Do not configure the 'Folder' property, this means the flow will be triggered whenever a new folder or file is created in the configured library.

2. Check for the Full Path (triggerOutputs()?['body(FullPath)'] property from the trigger action and check for the extension, if there is an extension then the created item is a file and you can continue with the logic, if it doesn't have any extension, then its a folder so you can stop the flow. 


Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...



Thanks for the response!


I am unable to do nr 1 since my library contains much more than the folder which I share with externals. I might also want to create files and folders of my own in other parts of this library, so this would make it trigger often when I don't want it to trigger. Is there any other solution to getting it to trigger on folders, except making it library-wide? 

Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (4,285)