web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : In/gEnxH2iLX0cYcZ1zc0J
Power Automate - Building Flows
Answered

When a file is created (properties only) - exclude new folders from triggering Flow

Like (0) ShareShare
ReportReport
Posted on 2 Mar 2023 17:33:39 by 104

I have a document library and a list in a SharePoint site. When a list item is submitted I have built a flow that creates a folder in the document library and gives the requested people access. This part works fine. 

 

I have a second flow that basically sends an email to those with access to the folder when a new file is uploaded to their folder. This works absolutely fine for files. However when the initial folder is created from the first Flow, this triggers the second flow as it treats the folder as a new file. 

 

Is there a way I can amend the second Flow to exclude folders from either the "When a file is created (properties only) trigger" or the "Get file properties" action?

 

flow 1.JPG

I have the same question (0)
  • SamB2 Profile Picture
    104 on 03 Mar 2023 at 11:36:39
    Re: When a file is created (properties only) - exclude new folders from triggering Flow

    Thanks @grantjenkins - that is very helpful.

  • Verified answer
    grantjenkins Profile Picture
    11,059 Moderator on 03 Mar 2023 at 04:53:35
    Re: When a file is created (properties only) - exclude new folders from triggering Flow

    You can add a Trigger Condition that checks if it's a file (Not a folder) so the flow will only run if it's a file.

     

    The Trigger Condition would be:

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

     

    grantjenkins_1-1677819173126.png

     

     

    grantjenkins_0-1677819142229.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard
Loading complete