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!

 

 

21 REPLIES 21
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

 

Duramaxster
Frequent Visitor

When I have customers ask for sub-folder additions. They are usually specific. The user will save a file with a specific tag in the file names. For example, a user adds a file and adds to the file name "_For Review". I create a condition that looks for a file that contains that specific name in the file name. Just a thought!!!

Duramaxster_0-1657388752067.png

 

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (5,927)