cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vj_99
Level: Powered On

Copy files from SharePoint document library to OneDrive for Business using Flows

Hi there,

 

I was trying to build a flow to copy the files from SharePoint document library to OneDrive for Business (Cloud). I created a trigger called 'When a file is created or modified (properties only)' , an action to fetch metadata properties 'Get file metadata'  for SharePoint and 'Copy file' for OnDrive for Business. 

 

The flow get through until the SharePoint side but with the OnDrive i get an error saying 'The file id is not valid'.

 

{
  "status"400,
  "message""The file id is not valid.",
  "source""api.connectorp.svc.ms"
}

 

Flow_error.PNG

Flow_error 2.PNG

Please help me out with a resolution for this error.

 

Thanks in advance.

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Copy files from SharePoint document library to OneDrive for Business using Flows

Hi @Vj_99,

 

Do you want to create the a to OneDrive for Business when the file is created in SharePoint library?

Instead of using OneDrive for Business Copy file action, please use Create file action.

I have made the following flow for testing and it works great.

Image for your reference:

 1.PNG2.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vj_99
Level: Powered On

Re: Copy files from SharePoint document library to OneDrive for Business using Flows

Hi Mabel,

 

I tried your workaround, but now i get a different error "Unauthorized".

 

However, just to give you a bit of background, I am actually trying to copy the files across to a different user's OneDrive for Business account NOT my personal account.

 

Is this achievable?

 

Regards,

Vijay Bhogi

Vj_99
Level: Powered On

Re: Copy files from SharePoint document library to OneDrive for Business using Flows

Image for your reference:


Flow_error3.PNG

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,762)