cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeggyLang
Helper V
Helper V

When a new file is created in Sharepoint site A copy to Sharepoint site B

I have created a very simple flow;

When new file is created in Sharepoint site A copy file to Sharepoint site B

 
 

PeggyLang_2-1607053562744.png

 

The flow fails;

PeggyLang_3-1607053633730.png

I don't really understand why this is failing.  Do I have the incorrect dynamic content in the action?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @PeggyLang :

Please try this flow:

1.JPG

Best Regards,

Bof

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @PeggyLang :

Please try this flow:

1.JPG

Best Regards,

Bof

View solution in original post

@v-bofeng-msft  thank you very much.  That worked!! 
Have another question now.  The 'Source' library has a folder structure that is replicated in the 'Destination' library. 
The new file was added in 'Source' library to '2021 F5'.
The newly created file was added to root folder in 'Destination' library.  It needs to be in '2021 F5' folder of Destination library.  How do I have the file created in the appropriate folder?

Source Library

PeggyLang_1-1607089275820.png

 


Destination Library

PeggyLang_0-1607089240272.png

 

 

v-bofeng-msft
Community Support
Community Support

Hi @PeggyLang :

The key is to get the folder path of the newly created file and replace the root directory in the original path with the new root directory.Please try this:

1.JPG

Reference Expression:

substring(
triggerOutputs()?['body/{Path}'],
indexOf(triggerOutputs()?['body/{Path}'],'/'),
sub(length(triggerOutputs()?['body/{Path}']),add(indexOf(triggerOutputs()?['body/{Path}'],'/'),1))
)

Best Regards,

Bof

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,342)