Call web service from Nintex Workflow – To Copy List item between Site Collections

Requirement: Copy a List item between site collections.

Oops! Nintex doesn’t has any direct method to do that. It offers Copy/Move/Create list items with in Same site, but not between site collections. So, Lets seek help from Web services with Nintex.

Lets say, I’ve a Source-list and Target-List. What I want is: based on some conditions, copy the item from source list to target list. Here is the Nintex’s part.

  1. Drop a Call web service action in Nintex workflow
Nintex Call Web Service Action

2. Get the web services from the target site, e.g: https://SharePoint-Site.com/_vti_bin/Lists.asmx, and then configure the action as per the below picture

Call web service from Nintex To Copy List item between Site Collections

So, Look at the highlighted sections. Here you have to specify the GUID of the target list and supply the XML data for values.

<Batch OnError="Continue">
 <Method ID="1" Cmd="New">
		  <Field Name="Title"> {ItemProperty:Title} </Field>
		   <Field Name="Salary"> {ItemProperty:Salary}</Field>
 </Method>
</Batch> 

Here, the {ItemProperty:Title} and {ItemProperty:Salary} are fields inserted using Nintex “Insert Reference” button!

For the Update operation, we can use the same method, only  the CMD changes from NEW to UPDATE.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <UpdateListItems xmlns="https://schemas.microsoft.com/sharepoint/soap/">
          <listName>my-List</listName>
            <updates>
              <Batch OnError="continue" PreCalc="TRUE" ListVersion="0"> 
              <Method ID="1" Cmd="Update"> 
                <Field Name="ID">{ItemProperty:ParentID}</Field> 
               <Field Name="ApprovedinTargetList">No</Field> 
            </Method> 
        </Batch>
   </updates>
        </UpdateListItems>
    </soap:Body>
</soap:Envelope>

The most important part here is: ID field, which maps our update operation with the particular list item. And XML is case-sensitive, e.g. “id” will not work, but “ID” will work!

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

20 thoughts on “Call web service from Nintex Workflow – To Copy List item between Site Collections

  • Do you know if this is possible in SharePoint Online?

    Reply
  • Hi, Thank you very much for this useful post,
    I was successful to run this workflow on my Test list but I have a problem that one Title replace the whole titles in Target list.
    I suppose to simply create 8 tittles from the source list in Target list, and each title is unique, I’ve added Query list action to query the IDs, and For each action to run Call web service. I’ve checked the XML but I can’t figure out the reason.
    I’m not sure if you’re checking this anymore, but any help would be appreciated!

    Reply
  • can we maintain the version history by this method as well ?

    Reply
  • I am working on a task similar to what you have posted above but in my source list i have Multiple lines of text,Date and Time and Lookup field and i am unable to copy them.

    Is there any way to do this?

    Thanks!!

    Reply
  • What about to remove an Item, would the CMD=”Remove”? Or how would that differ?

    Reply
  • Hi Salaudeen,

    I am trying to access external SOAP service in sharepoint page using AJAX, Jquery and I get access denied error. Can you please let me know how to solve this ? I am not allowed to use server code.

    Thanks !

    Reply
  • FYI this does not copy an item, it just creates a new item. UpdateListItems method adds, deletes and updates list items but it does not copy. What you are doing is creating a new list item and updating the meta data.

    Nintex/Web Services do not have a action/method to copy lists items between site collections or to folders with in lists.

    Reply
  • Hi Salaudeen,
    Thanks for this post as the content is hard to find on the web!
    Looking to see if you could assist…

    I’m am testing this solution prior to implementing but am hitting a wall right away when trying to create a new item in a target list from my source list.

    This is what I have in my SOAP Editor area:

    1496B2CF-21A2-4134-9B17-5744EB488DC7

    {ItemProperty:Title}
    {ItemProperty:Approver_x0020_1}
    {ItemProperty:ID}

    Originally, the BatchOn Error and we not in the code when I started to configure so I added per your example.

    URL I’m using for the target list is of a child site and is:
    https://opstd.uhc.com/onesite/intake/MoreTesting/_vti_bin/lists.asmx

    Not sure if you’re checking this anymore, but any help would be appreciated!

    Thanks!

    Reply
    • One common pitfall is: soap XML is case sensitive. ID and id are not same. check it once.

      Reply
  • Hi Salaudeen,
    I want to copy an attached file. Cannot figure out how to do that.
    Paul

    Reply
  • Hi!

    I am able to copy all the other list items to another site collection, except for one. Boolean type (yes/no)list item doesn’t appear to the destination list at all. Is there anything special I should know in these kinds of list items?

    Actually when I try to copy that boolean item, all the other items fail to copy too. If I try to copy items without that boolean item, everything goes fine.

    There are no error messages in the workflow and it seems to run good, but cannot get anything to destination list.

    Jack

    Reply
    • Hi Jack,

      You can use:
      TRUE

      or

      1

      Reply
  • Thanks for this. It is very helpful.

    How can I move items in document library using this method? Will this method work with document library ?

    John

    Reply
    • Sure, You can use Copy & Update web services. Here is the example:

      https://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems.aspx

      https://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx

      Reply
  • I was able to get the copy lis item going but Update does not seem to work

    Reply
    • Bhavneet,

      The above code posted from a working workflow. Compare your XML with the above provided XML on update section, Verify the ID of your existing List item.

      Reply
    • > should be line 6. This might cause an issue. Otherwise it is always to catch what has been returned from your request.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *