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
Brad_Groux
Community Champion
Community Champion

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!

v-bacao-msft
Community Support
Community Support

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.

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

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.
Brad_Groux
Community Champion
Community Champion


@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!

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

mjj4golf

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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Users online (3,225)