Skip to main content

Notifications

Community site session details

Community site session details

Session Id : cja3MPE3J9KMhV9WfEC/19
Power Automate - General Discussion
Unanswered

Create document library

Like (0) ShareShare
ReportReport
Posted on 3 Jul 2021 13:35:02 by

Hi, I'm new with power automate. May I know if possible to create a document library for all staff but with a condition like this:

User sign-in -> view & edit folder that belongs to them and cannot view other staff folder -> supervisor can view&edit only people in their department. 

 

I hope someone will help me with example how to solve this problem.

 

  • Expiscornovus Profile Picture
    31,732 Most Valuable Professional on 05 Jul 2021 at 18:06:02
    Re: Create document library

    Hi @FatyNab,

     

    My first question would be how you are determining that 'folder belongs to a user'? Are you tagging the folders with metadata or does the folder have the name of the staff member?

     

    Below are a couple of examples of type actions you probably can use in your scenario.

     

    1. Send an HTTP request to create a new library. This is using the REST API:

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#working-with-lists-by-using-rest

    BaseTemplate 101 is the number for a Document Library btw

     

     

    {
     "AllowContentTypes": true,
     "BaseTemplate": 101,
     "ContentTypesEnabled": true,
     "Description": "My list description",
     "Title": "@{variables('LibraryName')}"
    }

     

    createlibrary_restapi.png

     

    2. Create new folder action which uses the id of step 1. Below expression is used in the List or library field as a custom value.

     

    outputs('Send_an_HTTP_request_to_SharePoint')?['body']['Id']

     

     

    createnewfolder_newlibrary.png

     

    3. Grant access to the new folder for Jane Doe, using the id of the folder of step 2. Below expression is used in the Id field as a custom value.

     

     

    outputs('Create_new_folder')?['body']['ID']

     

     

    grantaccess.png

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - General Discussion

#1
stampcoin Profile Picture

stampcoin 23

#2
Pstork1 Profile Picture

Pstork1 22 Most Valuable Professional

#3
Gprior Profile Picture

Gprior 19

Overall leaderboard
Loading started