Hey guys,
So I have read a few posts but cant find anything that fits my particular scenario.
Our client creates a new folder in the projects folder (when a new project is started). That should then trigger a flow to create a static set of folders with some folders having additional sub-folders. The part that I'm stuck on is the sub-folder for certain folders.
So this would be a sample of what I'm trying to create. Create parent folder "Project A" and then the flow creates the folder set:
[
Name: "1 Legal"
Name: "2 Client"
Subfolders:
Name: "1 Samples"
Name: "2 Invoices"
Name: "3 Reports
Name: "3 Design"
Name: "4 Reports"
Name: "5 Safety"
Subfolders:
Name: "1 Induction"
Name: "2 First Aid"
Name: "3 Training"
Name: "6 Admin"
Subfolders:
Name: "1 Procedures"
Name: "2 Employment"
Name: "3 Templates"
Name: "7 Handover"
Name: "8 Maintenance"
]This was the basic flow
Step 1: Watch for a new folder and have the following trigger conditions
- @equals(triggerOutputs()?['body/{IsFolder}'],true)
- @equals(triggerOutputs()?['body/{Path}'],'Shared Documents/')
Step 2: Create the folder structure array
Step 3: Compose the "Document library\Parent folder name"
- DL = first(split(triggerOutputs()?['body/{Path}'],'/'))
- PFN = triggerOutputs()?['body/{Name}']
Step 4: Condition: Is this a folder (true or false)
Step 5: Apply to each and create a new folder
The other option I was thinking of was create a document library and have the actual file structure there and then when a parent folder is created, copy the folder structure to that new parent folder
Source:
Target:
This would be the action
Destination Folder: /Shared Documents/Project A ( triggerOutputs()?['body/{Name}'] )
The problem I'm facing here is that it wants to copy an actual folder and not just this libraries contents. So in order to get it to work I need to create a folder within "folder structure" but that then copies that folder with contents to the target rather than just the contents.
Hope this all makes sense, ideally i would like option 1 to work but also would like to know what I'm doing wrong with option 2
Thanks

Report
All responses (
Answers (