cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Sending email to sharepoint group as dynamic name

Jump to solution

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?

Labels: (1)
Reply
9 Replies
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

dynamically assigns a SharePoint group name to a variable

What kind of variable are you assigning the SharePoint group name to?

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

A text variable. Does that make the difference if I use another variable type?

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

I just tried using the "People or group" variable type and still didn't work!

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

Did you make sure on your people or group variable that it's configured it to also accept groups? Like so:

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump 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?!

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

Why do you need to assign it to a variable rather than just selecting the group in the email action?

Reply
Highlighted
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

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!

0 Kudos
Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

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!

Reply
Workflow Hero

Re: Sending email to sharepoint group as dynamic name

Jump to solution

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.

Reply