Read List attachments from SharePoint List Item using Nintex

The following workflow is designed to loop through multiple List attachments, capture their URL

Declared 4 workflow variables using the variable types as shown below:

Here’s a screenshot of the workflow structure:

The actions are configured as follows:

The “Call web service” is using the Web_Url lookup then the /_vti_bin/Lists.asmx extension which is a mandatory field that represents the full URL of the SOAP Web service to call. Once a URL has been entered, the Refresh button can be pressed to define the available methods.

The parameters are stored within the var_AttachmentXML workflow variable.

The “Regular expression” action removes the XPath namespace (e.g. xmlns=”http://schemas.microsoft.com/sharepoint/soap/”) as leaving it in would make it more difficult to write the XPath expression.

The “Query XML” action is querying the XML variable using the XPath expression //attachments/attachment to pull out the value inside the Attachment XML node for each Attachment node then storing them in our defined collection variable var_CollectionURLs.

The “For Each” action is used to store the var_CollectionURLs variable data within a text variable to be used in the “Build Dynamic String” action for each attachment.

To print the urls and check use Log History

Happy Nintexing 🙂

Advertisements

About Joseph Velliah
As a SharePoint Developer my professional interests tend to be technical and SharePoint focused. I run a blog at "SP RIDER" where you can expect to read HOW TOs and scenarios that I run into during my day to day job. I hope my posts will give back a little to the community that is helped me.

4 Responses to Read List attachments from SharePoint List Item using Nintex

  1. Karen Tan says:

    Hi Joseph,

    I was wondering if you could help me with a problem that I have been trying to solve for a few weeks but couldn’t. How do I attach multiple attachments in a single email notification in Nintex Workflow? The number of attachments varies, can be zero to up to 8. What I did was to extract out the attachments from an Infopath form and store in a list/library. But from there, I am not sure how to proceed. If I added “send notification” in the For-Each loop, there will be multiple notifications sent out. If I send out notification with the collection variable, it hits an error too. Appreciate if you could guide me to the correct route of handling this problem.

    Regards,
    Karen

  2. Karen Tan says:

    Thank you thank you thank you thank you!!! Finally got it working!
    Reason for wanting to send attachments in email is to have it sent directly to our Helpdesk Ticketing system.

    Cheers.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: