Hello, so the request is that a folder with a specific name will be created in sharepoint with a document inside, i want to see if its possible for Flow to detect that and then use the folder new to create a documentlibrary in a static sharepoint site and then also add the word document.
The flow would need to detect each time this happened in the onedrive.
Alternatively if i create a documentlibrary that stores word documents with FOLDERNAME - DOCNAME.docx could flow then detect the file is created in X library and use strings to create a new folder in Y site called FOLDERNAME then move the whole FOLDER - DOCNAME.docx to that folder automatically?
Thankyou
Solved! Go to Solution.
Hi @AndrewSmith84 ,
If you want to copy files from OneDrive, you will need to make some changes.
Please refer to the following image to improve Flow.
Hope it helps.
Best Regards,
Hi @AndrewSmith84 ,
Currently, Flow is unable to monitor whether a new folder has been created in OneDrive.
For alternative methods, you could consider the configuration below.
first(split(triggerBody()?['{Name}'],'-'))
Image reference:
Hope it helps.
Best Regards,
Thankyou @v-bacao-msft is this also possible from OneDrive? So the files would be dropped to onedrive with FOLDERNAME - FILENAME.docx format and then the Flow would create a folder in sharepoint and drop the file in.
Thanks
@v-bacao-msft it doesn't appear to work following your template.
In AndrewTest1 sharepoint document library I dump a word file named FOLDER - NAME.docx and the Flow stops on Create new folder Output but no errors.
Added my flow here: https://drive.google.com/file/d/1Xo9YW1KUZYdc5qDwUTTqPVSee-S5Zohj/view?usp=sharing
Thankyou
Ok I managed to get the flow working but the flow fails on Move file unless I point it to the exact filename in File to move, this should be dynamic however when setting it as Identifier it fails.
can anyone else assist please? thankyou
Hi @AndrewSmith84 ,
This is because the configuration of Destination Folder is incorrect.
Here you need to include the file name, which is the relative path to the file, not the path to the folder it is in.
So I integrated Folder path and Name into the path that makes up the file in Path.
The result of my test here is fine.
Best Regards,
@v-bacao-msft - Thankyou I have got it working now 🙂
If I wanted to modify this so that I was copying the same file from OneDrive for Business to Sharepoint would that work?
Thanks,
Hi @AndrewSmith84 ,
If you want to copy files from OneDrive, you will need to make some changes.
Please refer to the following image to improve Flow.
Hope it helps.
Best Regards,
Hello, is there anyway I could extend on this and create a second folder.
So currently your suggested solution works and creates a folder from filename FOLDER-DOCUMENT.docx, creating folder named FOLDER then moving the file to that folder.
However if I wanted to change the filename so it is FOLDER-SUBFOLDER-DOCUMENT.docx how would I go about this.
I have tried a few variations but end up spawning too many folder or none at all with errors. I assume I need to Compose and split the string properly. The document will then be moved into the SUBFOLDER.
Thankyou,
User | Count |
---|---|
23 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
45 | |
29 | |
26 | |
25 | |
22 |