Hi,
I couldn't find a solution to this anywhere.
I want to do the following with PowerAutomate: Every month, move all files from a specified folder in OneDrive to a folder in SharePoint that is then created and named based on the current month an year.
I am new to this. Any help is appreciated. Thanks!
Solved! Go to Solution.
Please see my example below and let me know if you have any questions. The expression that I used in the Compose action can be found in the comments are.
My solution:
In the Create Action, File Name I have used the Formula,
concat(formatDateTime(utcNow(),'MM'),outputs('Compose'))
The Compose action hold the 'Name' Property the output of 'List files in Folder' action.
Output in SharePoint it add the current Month number at the start.
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!
@CFernandes Thanks a lot for the quick reply.
Two questions regarding this:
Best
Please see my example below and let me know if you have any questions. The expression that I used in the Compose action can be found in the comments are.
@ScottShearer Great, thank you, this works! Even though the run history shows that the flow has failed due to a bad request at the "Create file" command. Error details: Root folder is not found. But all files are in a correctly named folder.
One small thing I had to change: in the "Create file" part the path needs to be "/Documents/..."
Also: Since I originally wanted to move the files, how do you delete the files in the OneDrive folder. For now it's only copying and then the files are both in the original OneDrive folder as well as the SharePoint.
Best
I'm glad this worked for you!
To delete the OneDrive files, add a OneDrive for Business Delete File action after the SharePoint Create File action inside of the loop.
Hi again,
I now got an error message with this flow for every single file that is supposed to be created in the new folder. Please see below. Could you clarify what is going wrong?
Thanks a lot!
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
42 | |
37 | |
37 | |
35 | |
25 |
User | Count |
---|---|
38 | |
38 | |
32 | |
30 | |
30 |