I have a workflow that dynamically assigns a SharePoint group name to a variable and then use that variable in To: field on an email action. I am selecting the variable name with the advanced option and using the "Email addresses" or "Email addresses separated by semi colon" and both do NOT return any email addresses. Whereas if I enter the sharepoint group name manually it does resolve the name and send emails to the group members!
I thought this had worked on a previous project, but now not sure, so can anyone please confirm if this approach should work or has recently changed?
Solved! Go to Solution.
Yes, I did. The only other option I'm thinking of is to create a collection variable and somehow pull out the people in the group and write their email addresses to the email action?!
It's a complicated WF that I inherited. It sets up to 9 different group emails depending upon the stage of the approval. The email To: CC: Subject: and Body: are all variables which are used via one email action. And I don't want to re-engineer it all unless I have to!
Hmm, ok, is this a SharePoint exclusive group or an AD synced group? In any case, I did some tests. I couldn't get the email addresses to log to the workflow history for either an AD synced or SharePoint only group when assigned to a variable and logging the variable as "Email Addresses." I tried allowing and disallowing "multiple values" as well.
Then, I set the variable to a SharePoint group and for the email action, put the workflow variable in the "to" field without formatting it at all. It still wouldn't print the "Email Addresses" to the workflow history, but putting it in the email field without formatting it at all worked and sent the email to the group users!
You are a genius!! How strange to not apply formatting and it works.... one of those don't ask why and go with it
You've just saved me a lot of re-work, thanks.