Skip to main content

Notifications

Community site session details

Community site session details

Session Id : mGlIjaBF58Q3sybK4bVWlr
Power Automate - Building Flows
Answered

SharePoint List item to create SharePoint library document folder in relevant library with copied details.

Like (0) ShareShare
ReportReport
Posted on 29 Jun 2022 19:07:22 by 19

Hi all,

 

Seeing if its possible to build a flow to copy content from SharePoint list item-> create a folder in a document library and copy the list content from select columns into the same columns on the newly created file. 

 

Essentially I have a master list where details are added under specific columns. I want to on creation create a folder with the same column details in a specific document library in the site based on an identifier. The columns and data pulled each time do not change only the identifier to signal where to create the folder which is set when the list item is created.

 

Eg. This copied

Untitled1.png

 To this

Untitled2.png

Just minus a few columns that aren't required for the library.

Any help would be appreciated. 

 

 

 

 

 

  • ryleybauer Profile Picture
    327 on 29 Jun 2022 at 21:00:47
    Re: SharePoint List item to create SharePoint library document folder in relevant library with copied details.

    Hey, 

    You'll have to add an additional step for "Update file properties". As far as SharePoint libraries are concerned, "Files" and "Folders" are both "Files" or "List Items". 

    ryleybauer_0-1656536373135.png

    If this helped, do you mind marking the other reply as the solution? 

  • 43201 Profile Picture
    19 on 29 Jun 2022 at 20:13:17
    Re: SharePoint List item to create SharePoint library document folder in relevant library with copied details.

    Thank you for your response, I'll stick to simple at this stage and work up to fancy! I'm fairly new to Power Automate, if you could clarify a couple of things that would be awesome.

     

    I've followed those steps and created the below.

    Untitled3.png

     

    This works like a charm and creates a file with the title in the relevant library but how do I add the addition column details to the relevant columns on the new file?

     

    Also this is an addition but if the details in the SharePoint list columns are updated at some stage after the initial creation of the folder, is it possible to have them automatically update the columns on the existing folder?

    Thanks so much for your help!

  • Verified answer
    ryleybauer Profile Picture
    327 on 29 Jun 2022 at 19:36:24
    Re: SharePoint List item to create SharePoint library document folder in relevant library with copied details.

    This is definitely possible. 

    Make a flow:

    1. Trigger: "When an item is created"
    2. Action: "Get item" (by ID from the previous step)
    3. Control: "Switch"
      1. Create a case in the switch statement for each folder
      2. Action: "Create new folder" step under EACH case, set to point to each specific library to match the condition
      3. Action: "Update file properties" step under EACH case, and use the "ID" from the "Create new folder" step

    If you want to get fancy, you could use library GUIDs to make the flow less dependent on each library being predefined as a case in the switch statement. The Create Folder action can take a library name or library GUID (GUIDs are usually better as they don't get broken if lists are renamed or have characters that are substituted like spaces). You would probably be best making a second list with a column for library name and a column for the GUID of the library (it's at the end of the URL if you open the library settings).ryleybauer_0-1656531135815.png Then, on your Required RA's list you would add a lookup column to select which library it goes into and if you include the GUID in the lookup columns then you should be able to use it directly from this flow to dynamically specify which library to create the folder. 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,081 Most Valuable Professional

Leaderboard
Loading started