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 🙂

4 thoughts on “Read List attachments from SharePoint List Item using Nintex

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

    Like

    1. Karen,

      Thank you for contacting me.

      As we are using SharePoint as a collaborating platform, why don’t you show all your attachments as hyperlinks in your email.

      Let us consider you have to send the same email to 2 people then your email attachments are replicated in your sent items + 2 people inbox.

      This is just a suggestion. If you still have to send your attachments in email please follow this link http://blogbaris.blogspot.com/2013/09/nintex-workflow-2010-multiple-dynamic-e.html?_sm_au_=iVV0jVbsjvLq0sMj

      Let me know if you have any queries on this.

      Like

  2. 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.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.