I created a Flow that grabs a folder from a subfolder inside one SharePoint library and moves that folder into another subfolder of the same name to another SharePoint library. It works if I hard-code a part of the URL into the destination URL, but I'm trying to grab part of the URL from the source URL in order to append that to the destination URL so that my Flow knows where to put the specific folder based on its original name.
If I have clients AAA, BBB, CCC, let's say I want to grab folder 67890 from client AAA - testsource/Shared Documents/AAA/12345) - and I want to move that into another library -testDestination/Shared Documents/AAA/67890/Coordinator . So 67890 in testSource will be moved into testDestination's 67890 folder that already exists, and will be renamed "Coordinator".
Also, disregard the 12345 in the images or replace with 67890 as this was the first test folder I moved. That will always change.
What I am ultimately trying to do is grab the AAA/67890 from source URL or Link to Item dynamic content included in the screenshot. Is there a way to use indexof or lastindexof to do that?
First part of Flow
Last part of Flow
testSource folder (starting point)
testDestination (endpoint)
Metadata after Flow runs