cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Copy file from Subsite to Main Site Flow

Hello everyone!

 

I'm brand new to Flow and I've been playing around trying to make some tests for some workflows I want to implement in my SharePoint site.

 

What I need to do is very simple:

 

Every time a file is created within a folder of a subsite, copy that same file to another folder within the main site.

1out2.PNG2out2.PNG

 

However, when the workflow runs, I get this error message:

{
  "status": 404,
  "message": "The file /Marketing/BrandTest/4.docx does not exist.\r\nclientRequestId: c4ff919c-f6ef-425e-8535-d350659bf472",
  "source": "https://siteurl.goeshere/Marketing/_api/web/GetFileByServerRelativePath(decodedUrl=@p)/Etag?@p='%2fMarketing%2fBrandTest%2f4.docx'",
  "errors": [
    "-2130575338",
    "Microsoft.SharePoint.SPException"
  ]

Why is it telling me this? I have manually added a test file to the BrandTest folder but I still keep getting the same message over and over.

 

Am I doing the flow wrong? Am I missing something? Is it even possible to move files from a subsite to the main site through a workflow?

 

Thanks beforehand for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Copy file from Subsite to Main Site Flow

Hi Kberrio,

 

Per my test, copy files between subsite and main site is currently not possible. It seems that this action only works within the same site.

 

Please consider to use the action “SharePoint – Create file”. This action will be able to create a file in the main site when the file is created in the subsite.

 

I have made a test on my side, and the action “create file” works fine.

3.PNG

 

Please take it for a reference and try it on your side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Copy file from Subsite to Main Site Flow

Hi Kberrio,

 

Per my test, copy files between subsite and main site is currently not possible. It seems that this action only works within the same site.

 

Please consider to use the action “SharePoint – Create file”. This action will be able to create a file in the main site when the file is created in the subsite.

 

I have made a test on my side, and the action “create file” works fine.

3.PNG

 

Please take it for a reference and try it on your side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: Copy file from Subsite to Main Site Flow

Whoa, I never thought that this was even possible. It just reminds me of how powerful MS Flow is and what it is capable of doing.

Thank you so much your help!

anton-khrit Helper V
Helper V

Re: Copy file from Subsite to Main Site Flow

Hi,
 
You can copy SharePoint folders and subfolders cross-site in Microsoft Flow with the help of Plumsail Actions.
 
It has Plumsail SP connector that provides a set of actions for SharePoint management, including copying folders cross-site.
 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,905)