0

I am working on a online document library inside out modern team site. and i want to automate the following:-

1- when a user create a root folder inside the document library, to create some sub-folders with 3 hierarchy.

2- for example if a user add a root folder named "HR", to have these sub-folders automatically created:-

HR
  - Private
       -For Employees
       -Confidential
       -Procedures
          -Employees
          -External Users

  - Public
       -For customers
       -For suppliers

Now if i were inside SP 2010 or SP 2013, i would simply create a server-side event receiver and do the work. but in SP online creating remote event receivers are not working for me, especially i am unable to debug them using azure service bus (which was deprecated). so i am asking if i can achieve what i am looking using sharepoint workflow 2013 or flow or another approach?

Thanks

1

The easiest way to accomplish this is through Microsoft Flow.

You can use "item creation" as trigger, using a if condition to check if the element is a folder and the item is created in a specific folder, then if both condition are verified you can add as many "Folder creation" actions you want to build the subfolders tree.

See the below example:

enter image description here

Important notes:

  • Folder name rely on your istance language (with my italian settings "Shared documents" corresponds to "Documenti condivisi")
  • If you want to create a folder with subfolders you can skip that parent creation, creating a subfolder automatically add the parent folder if it is missing
  • With MS Flows you can manage permission settings on folders (add an action "Set permission to folder")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.