I have got a SharePoint library in which documents are updates on an irregular time schedule.
I now want people to get notified when a document is updated.
The peopel that should be notified are members of a SharePoint (security) group. I could not see how to use the SharePoint alerts with SharePointz groups. Therefore i created a small Nintex workflow that uses the 'send notification' action to send an e- mail to the people that are members of a certain SharePoint group. I set the workflow to always start when new files are added or files are changed.
This works exept for one little problem: Some people get more than one e-mail.
I guess that it is because of the following:
In the SharePoint group I added individual users and I also added ActiveDirectory groups. Some of those groups are nestet that means that they contain other ActiveDirectory groups. I think that those users might be in more than one of those groups and therefore get the e-mail more than once.
Is there a way to prevent people from getting more than one e-mail?
Solved! Go to Solution.
You can retrieve the members of a SharePoint group using the web service call to UserGroup.GetUserCollectionFromGroup. This returns an XML and you could iterate through this and add the values to a collection. Then use the collection operation to remove duplicates. Then use a build string to concatenate the users together and use in a single Send Notification with all of the users. It's a few loops, but seems logical. The only thing I am not sure of is if the web method is able to break down the members of AD groups.
But if you are adding the SharePoint group in the To field of a single Send Notification action, I would imagine that the SMTP delivery would ignore duplicates in the To line.
I agree with Andrew's response, if people are getting more than one email then your SMTP server is not filtering duplicates correctly.
Nested AD groups are a bugger to deal with, but they should still only get one email everyone time.