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

  • 13 February 2019
  • 4 replies
  • 20 views

Badge +1

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

 

77i5DE11E418DB2AE8E.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('/sites/GRPTiffanyAvinSandbox/Lists/EmployeePersonnelWF/Attachments/30/TEST 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"}}}

_______________________

78i958FDA793E297D8A.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.aspx

 

 

 

 


4 replies

Userlevel 5
Badge +13

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...
Badge +1

Im running into the same issue.

Badge +2

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

Badge +3
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)

Reply