laul
Rookie

HELP!! Nintex Workflow for Office 365 - Copy Attachments to Document Library

I'm not an expert so please help if you can: I have posted the screen shot along with the write up.

 

Error.PNG

 

/sites/GRPTiffanyAvinSandbox/Lists/EmployeePersonnelWF/Attachments/30/TEST page.docx 

 2/13/2019 9:18 AM Comment

https://mckessoncorp.sharepoint.com/sites/GRPTiffanyAvinSandbox//_api/web/getfilebyserverrelativeurl... page.docx')/copyto(strnewurl='/GRPTiffanyAvinSandbox/Employee%20Documents 

2/13/2019 9:18 AM Comment

BadRequest - {"error":{"code":"-2147024809, System.ArgumentException","message":{"lang":"en-US","value":"Server relative urls must start with SPWeb.ServerRelativeUrl"}}}

_______________________

String.PNG

{Workflow Context:Current site URL}‌/_api/web/getfilebyserverrelativeurl('‎‏{Variable:AttachmentURL}‌')/copyto(strnewurl='/GRPTiffanyAvinSandbox/Employee%20Documents/‎‏{Variable:AttachmentFileName}‌',boverwrite=true)

 

Link to the orginal post:

http://www.vadimtabakman.com/nintex-workflow-for-office-365-copy-attachments-to-document-library.asp...

 

 

 

 

Reply
4 Replies
bamaeric
Nintex Employee
Nintex Employee

Re: HELP!! Nintex Workflow for Office 365 - Copy Attachments to Document Library

Probably not this obvious, but in one of your Workflow History comments you have an extra forward slash (/) in the URL:

 

https://mckessoncorp.sharepoint.com/sites/GRPTiffanyAvinSandbox//_api/web/getfilebyserverrelativeurl...

Should it be:?

https://mckessoncorp.sharepoint.com/sites/GRPTiffanyAvinSandbox/_api/web/getfilebyserverrelativeurl...
0 Kudos
Reply
WorkFlow_Man
Rookie

Re: HELP!! Nintex Workflow for Office 365 - Copy Attachments to Document Library

Im running into the same issue.

0 Kudos
Reply
workflows
Scholar

Re: HELP!! Nintex Workflow for Office 365 - Copy Attachments to Document Library

Hi, I am currently working on a CopyTo action from a Library and To a Library in the same site.

Did you create/sort the issue you had as in this post ?

I am curious if you can share an example how you did it.

Thanks

Jaap

0 Kudos
Reply
srjnchandra599
Scholar

Re: HELP!! Nintex Workflow for Office 365 - Copy Attachments to Document Library

You need to add "/sites/"

{Workflow Context:Current site URL}‌/_api/web/getfilebyserverrelativeurl('‎‏{Variable:AttachmentURL}‌')/copyto(strnewurl='/GRPTiffanyAvinSandbox/Employee%20Documents/‎‏{Variable:AttachmentFileName}‌',boverwrite=true)


{Workflow Context:Current site URL}‌/_api/web/getfilebyserverrelativeurl('‎‏{Variable:AttachmentURL}‌')/copyto(strnewurl='/sites/GRPTiffanyAvinSandbox/Employee%20Documents/‎‏{Variable:AttachmentFileName}‌',boverwrite=true)
0 Kudos
Reply