Skip to the content Skip to the Navigation

Workflow Excellence

  • Workflow Excellence
  • Blog
  • Contact
Blog
  1. HOME
  2. Blog
  3. Nintex Workflow
  4. Nintex Workflow – Get Attachment Urls UDA
December 30, 2020 / Last updated : December 30, 2020 Vadim Tabakman Nintex Workflow

Nintex Workflow – Get Attachment Urls UDA

It sounds like this might be difficult, but as it turns out, it’s really not bad at all.  What we are trying to do here, is get access to the urls of the documents that were attached to an Item or Task in SharePoint.  In fact, building a Nintex Workflow User Defined Action (UDA) to do this seems a little odd, since the UDA contains only two actions.

What’s was that you just said?  You don’t know what a User Defined Action is and why you would want to use it?  Well, take a look at this : What is a User Defined Action?

What does the UDA do?

There are a important components of this UDA. 

1. We need to specify some parameters.  Two input parameters (ListName and the ItemID) and an output parameter (Collection of Urls).

UDA Parameters

2. Next we need a Call Web Service action.  This will allow you to query the item and pull out the Urls of the attachments on the item.

SharePoint exposes a http://msdn.microsoft.com/en-us/library/lists.lists(v=office.12).aspx web service, which in turn has a GetAttachmentCollection web method.

*** WARNING *** – the Call Web Service is configured to use a Nintex Workflow Constant called Farm Admin.  In order to use this UDA, you need to create a constant with that name, or use an existing one and update this Call Web Service action.

Call Web Service

3. Finally in this UDA, we have a Query XML action.  This is used, because the result of the web service call above, is an XML chunk and we need to extract the Urls from that, using an XPath expression.

Query XML

4. The result is a UDA that looks like this.

UDA Design

Without repeating what is in the “What is a User Defined Action?” post, I’ll just say that the two reasons why I chose to make this into a UDA, are that it makes it easier for me to share it with you, and also that not everyone has access to the Call Web Service action, so this is a nice way to hide it from end users, but still give them the ability to do this.

Using this User Defined Action

Simply dragging this action to a workflow and configuring it with the current list and item and storing the urls in a Collection variable is very easy.

Here is what the workflow looks like :

Workflow Design

By looking at the UDA action configuration, you’ll see it’s quite easy to configure, even for end users.

UDA Usage

The final part of the workflow is simply iterating through the Collection of Url results and logging them to the Workflow History.  You can do what you want in the For Each loop, but this is just to show all the urls and show you how to iterate through it. 

What Does the Output Look Like?

The following is what a list item looks like with a number of attachments:

Item Properties

When we run the workflow on this item, this is what the workflow history looks like:

Workflow History

This can be also used to get attachment urls for documents that were attached to a Workflow Task.

Downloads

Nintex Workflow 2013

Download the files

Categories
Nintex Workflow
Tags
Call Web ServiceFor EachLog in the History ListNintexNintex WorkflowQuery XMLUser Defined Action

Leave a Reply Cancel reply

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

Nintex Workflow

Previous article

Nintex Workflow – Updating an Excel Spreadsheet UDA
December 30, 2020
Nintex Workflow

Next article

Nintex Workflow – Approval based on User Status
December 30, 2020

Recent posts

Nintex Workflow Cloud and XML Complex Nodes

December 10, 2021

Nintex Workflow Cloud and XML as Temp Storage

December 9, 2021

Nintex Workflow Cloud – PadRight

April 13, 2021

Automating a Shadowing Program

January 14, 2021

Nintex acquires K2

December 31, 2020

Nintex Workflow Cloud – Archiving Documents

December 31, 2020

Goodbye SharePoint 2010 Workflows Online

December 31, 2020

Nintex Workflow Cloud – Math Power Component Workflow

December 31, 2020

Nintex Workflow Cloud – Looping

December 31, 2020

Nintex RPA – Processing Filtered Excel Data

December 31, 2020

Category

  • Drawloop
  • Nintex Forms
  • Nintex Reporting
  • Nintex RPA
  • Nintex Workflow
  • Nintex Workflow Cloud
  • Nintex Workflow for Office 265
  • PowerShell
  • Promapp
  • Tools
  • Training

Archive

  • December 2021
  • April 2021
  • January 2021
  • December 2020

Interesting Sites

Nintex
Simplifying Processes
Jesse McHargue
Around SharePoint
Haley Walsh
Kok Koon
Nicole Vesser

Copyright © Workflow Excellence All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

MENU
  • Workflow Excellence
  • Blog
  • Contact