cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chenjonathanc
Frequent Visitor

How to exclude subfolders when using Trigger: "When a file is created (properties only)"

I have a Sharepoint folder "1" 

Folder "1" has a folder inside it called "1a" 

I am triggering a flow through "When a file is created (properties only)"

 

I currently have a flow that triggers off of a file being dropped into Sharepoint folder "1". The flow ends in moving that file from folder "1" to "1a". This seems to trigger another instance of the flow, so it seems like Flow is counting files created in "1a" as being created in "1". 

 

How can I exclude subfolders from the trigger? I.e. I'd like to ONLY trigger flows from creation of files in "1" and not any of its subfolders. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: How to exclude subfolders when using Trigger: "When a file is created (properties only)"

 

Hi @chenjonathanc ,

 

You could set trigger conditions. Flow is triggered only when the folder path is equal to the specified folder.

Image reference:

75.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: How to exclude subfolders when using Trigger: "When a file is created (properties only)"

Hi @chenjonathanc 

 

The trigger is by design. What you could do is check the Folder Path property under an IF condition to avoid the set of actions after the trigger if it's from sub-folder.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Community Support
Community Support

Re: How to exclude subfolders when using Trigger: "When a file is created (properties only)"

 

Hi @chenjonathanc ,

 

You could set trigger conditions. Flow is triggered only when the folder path is equal to the specified folder.

Image reference:

75.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

chenjonathanc
Frequent Visitor

Re: How to exclude subfolders when using Trigger: "When a file is created (properties only)"

Thanks @v-bacao-msft , this is a clean solution. 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,200)