cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Easy way to Copy SharePoint Library Item to Archive Library (Attachment and meta data)

We are using a Nintex workflow on a SharePoint Library with a Word document attached to Items.

In the Workflow we want to Copy the current version to an Archive Library before entering a review cycle. What is the easiest and practical way to make that Copy SharePoint Item action happening?
I have read all other posts but they are some older and not having the actions in place like we have now in the latest Nintex versions O365. 

Your thoughts and maybe a solution is welcome.

Thanks

Jaap

 

Labels: (1)
Tags (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Newbie

Re: Easy way to Copy SharePoint Library Item to Archive Library (Attachment and meta data)

Update: I have found 2 articles, 1 from Vadim who explains it for a List Item with attachments:

https://vadimtabakman.com/nintex-workflow-for-office-365-copy-attachments-to-document-library.aspx

and the below one which explains a method for a Library (using the CopyTo webservice)

http://www.benprins.net/2017/05/01/sharepoint-2013-workflow-copy-files-with-rest-api/

I will workout the first one based on the initial workflow done by Vadim and replace the endpoint url to something like this as explained by ben because I need this for a Library and not a List Item Copy.

[%Workflow Context:Current Site URL%]_api/web/folders/GetByUrl('Original Document Location')/Files/getbyurl('[%Variable:currentItemName%]')/CopyTo(strNewUrl='/sites/Meetingsite/DocumentNewLocation/[%Variable:currentItemName%]',bOverWrite=true)

 

If I am not in the right direction, can you let me know :-)

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Easy way to Copy SharePoint Library Item to Archive Library (Attachment and meta data)

Just got to the one-liner code to copy the attachment across.

See attached 2 actions I have used. https://domain.sharepoint.com/sites/yoursite/subsite/_api/web/getfilebyserverrelativeurl('/sites/you...)

0 Kudos
Reply