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 / Moving invoice documen...
Power Automate
Answered

Moving invoice documents from one folder to another in Sharepoint

(1) ShareShare
ReportReport
Posted on by 2
Hello there, 
 
I haven't any experience in building flows in Power Automate but would really appreciate some guidance/advice on how to approach the below issue. 
 
In Sharepoint, we have a folder structure like below:
 
> Invoices ready to be paid
> Payment run '1'
> Payment run '2'
etc etc 
 
The invoice ready to be paid folder has a large number of documents that have been processed and our objective is to move a selection of these into a newly created 'Payment run' folder based on what we have named the document. 
For example, in the invoice ready to be paid folder, we have 1000 invoices named like so, INV-1, INV-2, INV-3 etc, and we want 150 of these invoices moving into the payment run folder which are selected by me. 
 
Is it possible to create a flow where I provide the info of the two folders in use (invoices ready to be paid, and payment run folder) and provide a list of documents based on name that I wish to be moved?
 
Thanks very much!
Categories:
I have the same question (0)
  • MMcCloud Profile Picture
    357 Super User 2025 Season 2 on at
     
  • Suggested answer
    MMcCloud Profile Picture
    357 Super User 2025 Season 2 on at
    Good Morning Friend,

     

    It is possible to move the files based on their type from one folder to another even across document libraries or individual site collections.

     

    To do so follow these steps:

     

    1) Define your folders we will use your first case of Invoices Ready to be Paid.



    2) Use the List folders command selecting your site and your file identifier. This action will produce all the files underneath and their information.


     

    3) Then based on what your condition is (from what I am reading your condition is them being in this folder) run the Move File action

     

    This action will allow you too choose the target file which you will have from your "List Folder" action above. So for each of the files you would be moving them from the location they are in to their new location



    I created an identifier variable in this example. Which holds the Id dynamic value from the For Each going through the items from our List Folder Action. In your case list File.



     

     

    This should complete what you are asking for.



    If you would like some human in the loop redundancy you could add an approval sent to yourself or whoever is managing this with a condition based off of it that holds up the process to confirm its only getting the files you want every day. Set the condition to if it is approved then it kicks off and if it denied it stops and leaves them until edits are made.

     

     

    Hopefully this helps feel free to reach out with any other questions!



     

     
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,412 Super User 2025 Season 2 on at
     
    The answer is yes, maybe, no with the former being closer.
     
    Here is what I heard.
    1. I have a "pattern" of named documents, such as INV-1 through INV-150
    2. I want in a UI the ability to select folders for Source and Target
    3. I want to be able to input "some" type of text
    4. I want the flow to be able to understand what I typed in #3 as a "pattern" not a specific file name, and find all the matching ones, however in this case the pattern could be using numbers (sequential, maybe not???) so we cannot simply look for INV* because you could have INV_1 through INV_2599 but I only want to go from 1-150 (as in your example)
     
    The sticking point, but not the hinderance is the exact patterns of files you would need to do. This is critical at the beginning, otherwise we solve for 1-150 and your flow doesn't really work.
     
    Image that your pattern was always something like
    INV_#####
    TEST_#####
    FOO_####
     
    Then it is easy, because you can simply allow the user to type in the text part INV_ and then put the range of numbers 1 and 150 and the flow dynamically builds the name at run time.
     
    But if the pattern is actually not that simple it requires much more work.
     
    Can you please verify if my assumptions are accurate and also come up with some more specific scenarios for filenames so that a real applicable answer can be formulated.
     
    Cheers!
     
    If this helps you, please Mark as such and maybe a like :-)
     
     

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard