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 / Create document library
Power Automate
Unanswered

Create document library

(0) ShareShare
ReportReport
Posted on 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.

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard