Saturday, February 1, 2014

Nintex Call Web Service Action is Cool, Part 1.

Nintex'x Call Web Service Action is an incredible powerful tool and helps build an integration between your SharePoint environment and with external systems.  Not only that, it can be used to call SharePoint's web services, which makes it possible for a workflow to add a user to a SharePoint group, start a workflow on another document library, etc.

This post will explain how to configure the workflow action to add a user to a SharePoint group.  I hope this entry will be the first part of many as the Call Web Service Action is a powerful action that I use frequently.

The web service needed is located at http://spsite/_vti_bin/UserGroup.asmx.

 If you are new to web services and SharePoint, go ahead and copy and paste the url into your browser, replacing spsite with your SharePoint site url.  You should see a nice summary of the operations available under the UserGroup webservice.


Below is a screenshot of how I have configured the Call Web Service Action. I will go through how to configure each field.

URL: The location of the web service.  I used my farm account as the user, however you should be okay with any account that has full control over the site.  

Web Method: After the username is entered, you will need to click refresh.  Assuming the account has the correct permissions, the Web method drop down should be enabled allowing you to select AddUserToGroup.

If you leave the editor set to SOAP Builder, you should see a nice list of fields under Web service input.

groupName: The group name that the user is being added to.  I used the inline function fn-XmlEncode to ensure the string will not cause the workflow to error.  For example, the function should change ampersands (&) to the xml code of &amp.

userName:  This is the account ID of the user.  Do not include the domain name.

userLoginName: This is the account ID, but with the prefix of the domain name.

userEmail: The user's email address.

Nintex has a Query User Profile action that can be used to acquire a user's e-mail address.  You'll need to provide the action with the username and you will be able to acquire a number of different attributes stored within the user profile.

No comments:

Post a Comment