Send Email to Individual Users Using NINTEX WorkFlow

Introduction

I have a custom SharePoint list named “My Newsletter” that has the following columns.

custom sharepoint

Once the user adds a new item an email should be triggered to a SharePoint group in which I have already added the users. But in the email the other users should not be shown, in other words personalized email or BCC using NINTEX workflow. In a SharePoint 2010 NINTEX workflow we don't have an option for BCC. In this article you will see how to send email to individual users using a NINTEX workflow.

Workflow Design

work flow design

The Call web service action is used to get the user collection from a specified SharePoint group. The Query XML action is used to query the XML and get the email ID of the users. A For each action is used to loop using all the users from the collection. A Send notification action is used to send the email.

Newsletter workflow

  1. Navigate to the My Newsletter list.

  2. Click on the List tab and then click on Workflow Settings.

  3. Click on Create a Workflow in Nintex Workflow.

    create work flow

  4. Click on Cancel.

    select workflow template

  5. Drag and drop the Call web service action from the Integration section.

    call web service

  6. You will be able to see the warning symbol in the workflow action, click on that and you will be seeing the following warning message.

    warning message

  7. Click on Configure from the drop down list in the Call web service action.

    configure web service

  8. Click on the Insert Reference button for the URL column and then click on the Common tab. Select Web URL and then click on Ok.

    insert reference

  9. Append /_vti_bin/usergroup.asmx to the URL column.

  10. Enter the User Name and Password to call the web service and then click on the Reference button.

  11. Click on Ok.

    web service url

  12. All the web service methods will be populated. Select GetUserCollectionFromGroup web method that will be used to get all the SharePoint groups from the website.

    GetUserCollectionFromGroup

  13. Click on the Variables button.

    configure action

  14. Enter the variable name and select the variable type.

    create workflow variable

  15. Click on Save.

  16. The variable is created successfully.

    variable created

  17. Enter the group Name string (SharePoint group).

  18. Select Specify elements, click on m:GetUserCollectionFromGroupResult element and then click on the Apply button.

    XML browser

  19. Select the userCollectionXML variable for “Store result in” drop down.

    configure call web service

  20. Click on Save.

  21. Drag and drop the Query XML action from the Integration section.

    workflow action

  22. Click on Configure from the drop down list in the Query XML action.

  23. Click on the Variables button.

    click variable button

  24. Enter the variable name and select the variable type.

    select variable type

  25. Click on Save.

  26. The variable is created successfully.

    created new variable

  27. Select XML from the XML Source drop down list.

  28. Click on the Insert Reference button for the XML column and then click on the Workflow Variable tab.

    Select userCollectionXML and then click on Ok.

  29. Enter the XPath

    /defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@Email

  30. Select the users variable from the Store result in the drop down list.

  31. Click on Save.

    xml source

  32. Drag and drop a for each action from the Logic and flow section.

  33. Click on the Variables button.

    configure action for each

  34. Enter the variable name and select the variable type.

     enter variable name

  35. Click on Save.

  36. The variable is created successfully.

  37. Configure a For each action as shown below.

    configure foreach action

  38. Click on Save.

  39. Drag and drop a Send notification action from the User interaction section inside the for each action.

  40. Configure a Send notification action as shown below.

    configure action send notification

  41. Click on the Save button.

Publish the workflow

  1. Click on the Publish button in the ribbon interface.

    click publish

  2. Be sure the Title is set; optionally you can set the values for Description and Change Comments.

    set title
  3. Click on the Submit button.

    publishing workflow

  4. The workflow is published successfully.

    workflow published

Test the workflow

  1. Navigate to the My Newsletter list.

  2. Create a new item.

    create new item

  3. Select the item and then click on Workflows in the ribbon interface.

    go to workflow

  4. Click on the Newsletter workflow and then click on the Start button.

  5. After a few minutes the workflow status will be changed to Completed.

  6. An email will be sent to individual users as shown below.

    sending email

Summary

Thus in this article you have seen how to send email to individual users using a NINTEX workflow.

Up Next
    Ebook Download
    View all
    Learn
    View all