cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

When new files created in sub-folders of Folder

I have a parent folder 'a'  and I know that this will contain sub-folders with varying names e.g 'b' 'c'. I want to recognise when a file is added to any of these subfolders.

 

How can I get MSFlow to recognise 'When an item is created in a subfolder of this folder' as I won't know the specific subfolders name from the start of the flow,

 

I tried using the 'When an item is created in this folder' but it only recognises direct children, and not children of subfolders. It is only a 2 level hierachy, as I'll have parent folder -> child folder -> child document

 

Thanks!

 

 

20 REPLIES 20
KurtVanBalen
New Member

I found a solution for this issue:

Use the connector for items instead of files, here, select as List -> custom value -> enter the name of your document library). This connector will trigger for every created/modified file. 

KurtVanBalen_1-1645183012401.png

To filter some results out of this, for example, that this flow doesn't trigger when a folder is created/modified, use the following trigger condition: 

@equals(triggerOutputs()?['body/{IsFolder}'],false)

 

You can also define a folder, in which the flow only needs to active, you can do this with the following trigger condition:

@equals(startsWith(triggerOutputs()?['body/{Path}'],'Library name/Folder name/subfolder name/'),true)

 

KurtVanBalen_0-1645182998272.png

Or you can define a switch/condition to add multiple folders to your flow.

Hope this helps for some! It did for me!

KR,
Kurt - DWP Analyst /ICT application engineer at Imec vzw

 

Helpful resources

Announcements
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.

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!

Top Solution Authors
Top Kudoed Authors
Users online (2,531)