Copy and Move a Document Library in SharePoint Using Flows

Loading

  1. Create two document libraries and name them as source library and destination library in which we are going to copy or move documents from source library to destination library.
    • create or add any document in source library which we are copying or moving to destination library.

Copy a file :-

2. open power automate ->instant flow ->SharePoint : for a selected file -> Name=Docflow

3. Give the site address and named document library.

4. Add an action or new step from SharePoint like “copy file”

5. Now go to the eclipse of articular file which you are going copy from source library to destination library and start a flow as shown below.

6. After the flow runs the file will be copied to destination library

7. when the columns are different for source and destination also the files will be copied from one library to another.

here i have added an extra column to the source library as shown below i.e. Document is related.

8. The column is different in Destination library . Though the file is copied from source library to destination library as shown below.

9. Move a file :-

First create an instant flow by adding move action in the flow.

Add the site address and source library and destination library address to the action.

Here the columns of both source and destination libraries have to be same for performing move operation or we may also have many columns in destination library but it is mandatory to have the columns which are in source library. when you run the flow with different columns you may get an error as shown below

By removing the extra columns or adding same columns in both libraries will work correct in the flow

Here i have created an excel file in source library as shown below

Now we can move the file to destination library without any error. because we have the columns which are existed in source library in destination library also.

The file is removed from the source library and moved to destination library.

Leave a Reply

Your email address will not be published. Required fields are marked *