Thursday, February 25, 2016

Coercion warning: user or group does not have a valid e-mail address

This post is about sending emails to SharePoint Group (everyone in SharePoint group).
I was working on a requirement where a task has to be assigned to a SharePoint group and an email has to be sent to that SharePoint group upon task creation. So I created a SharePoint group in a Task List called “Approvers” and added few people to it. In SharePoint workflow added a “Send an Email” action and added “Approvers” group in “To” section. Published the workflow with no errors. Then I created a task and assigned the task to “Approvers” group. But the workflow was throwing below error in workflow history and was failing to send the email.

"Coercion warning: user or group does not have a valid e-mail address."

Solution: Use the “Return field as” Display Names instead of Email Addresses if you are having a SharePoint group in the email.

3 comments:

  1. This does not work for me. :(

    ReplyDelete
  2. In one of the other scenarios, where I have to send email to people picker field with multiple values I got the same error.
    Solution: Copied the people picker values into a workflow variable as a string. In the email, added the workflow variable as display names, semicolon Delimited.

    ReplyDelete
  3. You will receive the error even when you try to assign a people picker value to a workflow variable and people picker is empty. So check the condition for people picker value and assign the value to the workflow variable only if people picker value is not empty.

    ReplyDelete