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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trigger when folder is...
Power Automate
Unanswered

Trigger when folder is created in a Sharepoint Document Library

(0) ShareShare
ReportReport
Posted on by 36

I have a document library that is linked to my D365.  When a new record is created in the D365 entity and the user clicks to view documents, it automatically creates a new folder in that library and relates it to that D365 record.  Good.

 

My goal is to have a flow triggered from that initial folder creation that creates 3 subfolders.  The trigger seems to be the challenge.  I found some older post about using a trigger "when element is created", when I then use IF / THEN to identify if the element was a folder, but I can't find that available.  I hoped "when item is created" could do it, but that seems to only work for lists not libraries.

 

I also read older posts about not having anything to trigger based on folder creation.  Is that still true?  My first real flow... sorry if it's a very obvious answer.  

Categories:
I have the same question (0)
  • Verified answer
    mcin9781 Profile Picture
    on at

    Yes this is possible you can create a SharePoint trigger for "When a file is created (properties only)" and then use a condition that if "IsFolder" = true  then do whatever action you intend.  I mocked it up in my trial org, tested and it works as seen below.

     

    TriggerOnSharePointFolder1.PNG

  • mcin9781 Profile Picture
    on at

    I added another image because the one above was not clear to me.  If this helps please mark it as the suggested answer.

    TriggerOnSharePointFolder1.PNG

  • syed_sme Profile Picture
    76 on at

    Thank you, this worked for me!

     

    What would you suggest if I wanted to be notified of folder creation on any of the document libraries on the site? I have 50+ document libraries and want to monitor folder creation across them all.

     

    Not sure having 50+ flows would be manageable/efficient?

  • damonmast Profile Picture
    6 on at

    Hello @syed_sme was wondering if you figured out how to make the subfolders appear everytime a new folder was created?

  • damonmast Profile Picture
    6 on at

    Hey @tmiller  was wondering if you ever figured out how to make power automate make these subfolders whenever a new folder is created? If so would you mind sharing how you do that.

  • tmiller112 Profile Picture
    36 on at

    @damonmast I ended up just creating the root folder on my own, but only because that ended up being a better user experience.  It seems that the method outlined by mcin9781 would be effective, by using the trigger "When a file is created (properties only) and then a condition to determine if that is a folder, for creating subfolders only after an initial SharePoint folder has been created.

     

    In my case, I chose to remove the direct Documents (related) link from the dynamics form, and instead trigger a flow on record creation that creates the document location (dynamics) and creates even the beginning SharePoint folder.  I capture the name of the record from the dataverse trigger into a string variable and use it to "Create New Folder".... then my subfolders follow, as you see in the picture below.

     

    folder creates.png

     

  • damonmast Profile Picture
    6 on at

    Which trigger did you use for this? @tmiller 

  • tmiller112 Profile Picture
    36 on at

    @damonmast Because I was starting from PowerApps, my trigger is "When a row is added, modified or deleted" (dataverse trigger).  

     

    If you are attempting to trigger when a SharePoint folder is created, then the trigger should be "When a file is created (properties only)" (sharepoint trigger)

  • Community Power Platform Member Profile Picture
    on at

    hello!
    i saw smthg similar on a youtube vid, but i cant seem to get the isFolder condition to come up. What am i doing wrong?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard