Solved

How a copy list Item attachments to a folder


Badge +8

I have SharePoint 365 and Nintex WorkFlow and Form 365, how a copy list item attachments to a specific folder???

 

What is the configuration actions???, I saw the videos in some blogs, but this videos are the Nintex 2013 version and the actions are diferents.

 

Help...

 

Thanks

 

FMS.

icon

Best answer by philipplucas 16 August 2016, 15:01

View original

12 replies

Badge +11

Hi Federico,

you can achieve this the following way:

  1. Use "Web Request" action to call SharePoints Lists.asmx Webservice. See this blogpost for further information: Web Request action for O365​. This is rather easy, at the end it should like this:

     2. Use a "Query XML" action to extract the attachment urls from the web service response. Action should look like this:

     "var_respContent" is the variable where I store the web request result. The XPath Query will then extract only the "Attachment"      elements (an URL string) of that xml and store it in my collection variable "var_attachmentsColl".

     3. Use a "For Each" action to loop through all items of your "var_attachmentsColl" collection.

    

     4. Inside the "For Each" loop use a "Regular Expression". We need this to get the Site-Relative URL from the attachment URL (which      is an absolute url), we will need this URL later. Be careful, you may need to adapt the pattern I used for your attachment URL.

    

     5. Use an "Office 365 upload file" action to copy the attachment to your library. be careful with the "Folder path" parameter. For me      providing "Shared Documents" didn't work, i had to provide the display name of the library which is "Documents".

And that's it. As a result, all the attachments will be copied to your Documents library.

Let me know if you have any further questions.

Cheers

Philipp

Badge +8

Hi,

But, only works for document library, not for a customized list.

For the customized list, web request action, body, not there a "Current ítem".

FMS

Userlevel 6
Badge +12

‌ - 

Glad you were able to get it working!

Please be sure to mark your question as answered so other users can quickly see how you resolved the problem.

Thanks

Userlevel 6
Badge +12

My apologies, I thought you were able to solve the issue you were facing when you posted your simple 2 step workflow.

If you are looking for the Update Items action, it is located under the Libraries and List section:

Badge +8

Hi, thanks for response.

I try to replicated your workflow, but I have an error in the results.

This is the structure of my workflow.

1-Web request configuration

2-Query XML

3-For each

4-Regular expression

5-Office 365 Upload file

Badge +11

Can you show us the error? Do you know where the error originates?

Badge +8

Hi,

First, the document attached in the list is not loaded in the document library required.

I created an check mark in the history of workflow for each variable used according to explication, for to check some possible error.

Badge +8

Hi,

My SharePoint structure is:

I have a custom list in the site 1, subsite 1, and I need upload the each attachments for each item in this list in the document library, but ubicated in the site 2, subsite 2.

Federico

Badge +11

Hey Federico,

please check your web request action again. On the screenshot I can see that you entered the URL of your List but you are supposed to enter the URL of the webservice. See my screenshots for a reference.

Regards

Philipp

Badge +8

Hi,

 

3 or 4 months ago, I sent a case about "How a copy list Item attachments to a folder", but I have a problem again.

I´m review with TI departament and BINARIA ECUADOR (Nintex Partener) support about case and they said the following:

My web request action is configured with these parameters:

URL: https://bsistemas.sharepoint.com/sites/pruebas/_vti_bin/Lists.asmx

SOAP 1.1

SOAP Action: http://schemas.microsoft.com/sharepoint/soap/GetAttachmentCollection

Body: Content

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetAttachmentCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/">

      <listName>Lista WF</listName>

      <listItemID>37</listItemID>

    </GetAttachmentCollection>

  </soap:Body>

</soap:Envelope>

 

And I’m getting the message: <soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server was unable to read request. ---&gt; Request format is invalid: Missing required soap:Body element.</faultstring><detail /></soap:Fault></soap:Body>

 

Am I missing something in the body element?

Thank you for your support.

Fedeico MS.

Badge +2

Hi Federico

I am stuck in the same error which you got with the webrequest .How did you manage to solve the same .

Thanks

Jag

Badge +1

I ended up having the issue

XML content is invalid. Data at the root level is invalid. Line 1, position 1. can someone please help?

I am also attaching the design.

Reply