cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mj4golf
Frequent Visitor

Trying to copy files in a Sharepoint list to Onedrive for business

I need to get files(images) from Sharepoint to Onedrive for business. 

Can this be done?  I see a number of templates to do it from onedrive to Sharepoint but not the other way.

I want a trigger that when an upload to Sharepoint of a folder with images is done, it copies those same images/files   

to a specific folder on my Onedrive for business.  I'd apreciate any pointers. 

Mike

7 REPLIES 7
Super User
Super User

Re: Trying to copy files in a Sharepoint list to Onedrive for business

The templates are just guides, meant to be used for inspiration. Nearly every Flow you create will need to be customized based upon your workload and environment needs. 

With that said, yes, what you are seeking to accomplish can be done fairly easily using the SharePoint and OneDrive connectors, and an expression based condition. The Flow could look something like this:CopyNewImagesFromSharePointToOneDrive.png

Notice, the condition contains the Filen name and extension string with an Or statement that looks for image-based file exentensions. If it passes, it copies the file to OneDrive, if it fails, it does nothing.

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!

Community Support
Community Support

Re: Trying to copy files in a Sharepoint list to Onedrive for business

Hi @mj4golf ,

 

I think what you mean is to get the newly uploaded file in the SharePoint Library and copy it to OneDrive for Business.

 

Please refer to the following method to configure Flow.

  • Using When a file is created(properties only) as the trigger, you could specify the file's Folder.
  • Use ends with in Condition to determine if the file type is specified.
  • If the conditions are met, use Get file content action to get the file content.
  • Finally, create a file in the folder specified in OneDrive for Business using Create file action.

Image reference:

9.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mj4golf
Frequent Visitor

Re: Trying to copy files in a Sharepoint list to Onedrive for business

Thanks for the reply.

I created a flow per the two suggestions and got the same results for both-- below is the error:

 

flow error.JPG

This happens at the first stage in both flows above 

I tried everything but didn't come up with a sloution.  

Thanks for the help

mjj4golf

Community Support
Community Support

Re: Trying to copy files in a Sharepoint list to Onedrive for business

Hi @mj4golf ,

 

The error message shows Folder Not Found, please check if the Folder you specified exists.

Please click on the location of the icon to specify the folder.

 

Image reference:

31.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Trying to copy files in a Sharepoint list to Onedrive for business


@mj4golf wrote:

Thanks for the reply.

I created a flow per the two suggestions and got the same results for both-- below is the error:

 

flow error.JPG

This happens at the first stage in both flows above 

I tried everything but didn't come up with a sloution.  

Thanks for the help

mjj4golf


The 404 means that you are not routing to the proper directory for this step. In this case, you are trying to map to the following directory, but it does not exist:

https://stbernadettescatholic.sharepoint.com/sites/WebSiteInfo/Pictures/Gabriel Project 2018/Knots of Love

Either create that folder path, or fix the folder path to point to an existing folder and try running the Flow once again.

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!

mj4golf
Frequent Visitor

Re: Trying to copy files in a Sharepoint list to Onedrive for business

Thanks guys for the sug's.  However, I am using the folder icon to choose the folder.  But still get the error.

mjj4golf

Community Support
Community Support

Re: Trying to copy files in a Sharepoint list to Onedrive for business

Hi @mj4golf ,

 

Please try to configure the judgment of the folder location in Condition. Use Folder path to determine the folder path.

Configure the path to the specified folder, usually "LibraryName/FolderName/SubFolderName/".

Image reference:

13.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,152)