Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Mapping from a sharepoint list

(0) ShareShare
ReportReport
Posted on by

Hello,

 

My use case: create a document repository that will be populated by a group of users but that could only be seen by some individuals (let's say the files are provided by 50ish people but only 10 people can have access to all the files). The way I am trying to build it is the following:

- creation of two SharePoint sites: one input site and one output site

- the files on the input site will be moved to the output site using a SharePoint list that acts as a map between the two sites (e.g. files in Shared Documents/folder 1/ in the input site to be migrated to Shared Documents/folder a/ in the output site)

 

What I have done so far:

- creation of the two SharePoint sites

- creation of the SharePoint list

- construction of the flow that read the SharePoint list and uses the elements of the list as variables in the flow

 

What I need to do now

- the elements of the list are the path to the folders of interest. The paths are then provided as dynamic variables to a block that is supposed to list the files/folders in a given folder (in the folder given by the dynamic variable, i.e. the path). Then each file in the folder will be moved using the input/output path provided by the SharePoint list (the mapping list). 

 

The dynamic variable provided as path is not working. Could you please help me with that one?

 

Screenshot of the flow

 

flow_screen.png

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Mapping from a sharepoint list

    Ok, I think I have found the solution.

     

    While using the list folder block, when you want to indicate the path to the folder using the gui, the file identifier ends up looking like "/Shared Documents/test 1". But when you feeding it the file identifier with a (dynamic/string) variable you need to convert the / and the spaces to their url (?) codes

     

    / = %252f

    space = %2b

     

    Once this is solved, everything works fine!

  • Community Power Platform Member Profile Picture
    on at
    Re: Mapping from a sharepoint list

    First, thanks a lot for your answer.

     

    In the mapping list, I have the path in the input site and the path in output path (basically where the files are and where I would like them to be moved).

     

    I wanted to use the "List Folder" block to identify the files/folder in the input folder (i.e. the folder indicated by the input path), and then use an "Apply to each" block to move all the files.

     

    Here is the error message I am getting

    {
     "error": {
     "code": 404,
     "source": "unitedstates-002.azure-apim.net",
     "clientRequestId": "bba23c6e-11e3-4c28-86d2-3874db336db3",
     "message": "The response is not in a JSON format.",
     "innerError": "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
     }
    }

    The resource is there, its name has not been changed and should be available.

     

    Coming back to your questions, I do want to list the files in the folder, the folder being indicated by the file path.

    Then once all the files in the input folder would have been listed, I want to move them to the output folder (in the other SharePoint site), the site being indicated in the "Move file block" and the folder being indicated by the output path in the SharePoint list.

     

    Here are some details about the SharePoint List:

     

    Line 1: "Path in the Input site", "Path in the Output site"

    Line 2: "/Shared Documents/test folder 1", "/Shared Documents/test folder a"

     

    Thanks in advance for your help and assistance,

    Leonard

  • v-bacao-msft Profile Picture
    on at
    Re: Mapping from a sharepoint list

    Hi @Anonymous ,

     

    Do you want to get the corresponding file through File path recorded in the list?

    Then move the file to the corresponding SharePoint Library?

     

    List folder action is populated with the folder path instead of the file path, and is in the format "/LibraryName" or "/LibraryName/FolderName".

    If the full path to the file "/LibraryName/FolderName/DisPlayName" is recorded in the list, you could use this file path to configure Move File action directly.

     

    Could you describe the details of the files recorded in the List?

    Please provide more details.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at
    Re: Mapping from a sharepoint list

    the last block is the problem! thanks in advance for your help.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1