cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
S_D_Andrews
Level: Powered On

Flow - Moving a file between duplicate folder hierarchies in SharePoint whilst retaining place

Afternoon all,

Hope that you all had a great Easter and that some of that good will charm can help with my query.

 

Scenario:  I am after a workflow that will transfer a document once a specific condition has been met to the appropriate place in a folder hierarchy.  What does this mean exactly?  Well, I have a private team site where colleagues have a long-standing folder structure within an SPO Document library.  I have cloned this library structure and added it to a second, organisation facing site.  This organisaton facing site makes use of wiki pages but links to documents when and where appropriate.

 

Documents are prepared in the private Team Site until they're ready for publication to the public facing wiki.  I'm seeing a workflow that would recognise where a document sits within source and is able to move to the appropriate area in target.  The workflow I've created thus far, is able to determine when a file is ready to move but will only move to the root of the target library, not to the corresponding part in the folder hierarchy.

 

Tips and pointers appreciated.

 

3 REPLIES 3
Super User
Super User

Re: Flow - Moving a file between duplicate folder hierarchies in SharePoint whilst retaining place

All you need to do is reference the Folder path in the copy step, which you can get access to via the Dynamic content list under the When a file is created or modified (properties only) heading:CopyFolderPath.png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

S_D_Andrews
Level: Powered On

Re: Flow - Moving a file between duplicate folder hierarchies in SharePoint whilst retaining place

And there it is, right under my nose.   I'll test and will mark up as a response once I've got working.

 

many thanks

S_D_Andrews
Level: Powered On

Re: Flow - Moving a file between duplicate folder hierarchies in SharePoint whilst retaining place

Right, so with this one, I've generated an HTTP 400 error, with file not found.  From the error message, it looks like the flow is trying to create validate the target at source by adding the ID to the Root URL of the library.

 

Any suggestions on a fix?

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,988)