This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
Create a solution to send emails to all users in a specified SharePoint Group.
Before You Begin
You need to have a URM Service Instance, User SmartObject created. The easiest way to create this is to create a Copy of the UMUser SmartObject.
1. Search for the UMUser SmartObject in Designer.
2. Right click it and select properties.
3. There is a Save As button. Select this and place the SmartObject into a Category where you can access it.
4. Lastly, edit this SmartObject so it can be used in Workflow Solutions.
5. Select the SmartObject and edit it. This should open the Define Properties and Methods screen. Click back to get to the General Screen and check the Allow this SmartObject to be used in Workflows checkbox.
Once we have the UMUser smartobject created and ready to be used, you need to create a workflow.
1. Create the Workflow
2. Drop a Send Email event onto the canvas.
3. Open the SmartObjects node of the Context Browser. You should see the UMUser SmartObject here. If it is not, it means you did not allow the SmartObject to be used in Workflows. See Step #5 above.
4. You want to get all the Emails for the users in the SharePoint group, so use the Get Group Users method.
5. Drag the Email property into the To: field.
5. Once the Email property is dragged over, a new box will appear asking for Input Properties. This is the Group Name and Label name. K2 is usually used for the Label, but you should use the Security Label being used for your SharePoint Group. You can also pass values in from a Data Field or Item Reference as well, if this needs to be done dynamically. Simply drag the Item Reference or Data Field into the Group Name field. We want to return all items that match the filter.
6. Test the solution.