Forum Discussion
Brent Ellis
Aug 22, 2017Silver Contributor
Email a SharePoint Group from Flow?
Is there a way to email a SharePoint Group from a Flow? (not an O365 Group, not an AD group, but a legit SharePoint group) Or do I have to define and maintain an actual Distribution Group for flo...
jsondev
Sep 23, 2019Copper Contributor
I wouldn't suggest that using a REST call is a "hacky" technique out of desperation, although I understand your frustration if you are a power user. Most things for a web developer or software engineer are done via REST calls to a database, so this technique is very familiar. Brent's answer works perfectly fine for me and was well documented. The only thing he forgot to include was adding the variable, but once again, this is a familiar thing for a web dev.
Modifications from Brent's answer:
I removed "Title" from the filter to just return only emails since that's all that's required.
/_api/Web/SiteGroups/GetById(29)/users?$select=Email
Here's what I used for my schema, if you use this as sample payload it'll just convert the values such as "some text" to it's data type "String".
{
"d": {
"results": [
{
"__metadata": {
"id": "Some text",
"uri": "Some text",
"type": "SP.User"
},
"Email": "Some text"
},
{
"__metadata": {
"id": "Some text",
"uri": "Some text",
"type": "SP.User"
},
"Email": "Some text"
},
{
"__metadata": {
"id": "Some text",
"uri": "Some text",
"type": "SP.User"
},
"Email": "Some text"
}
]
}
}
mtorres
Sep 23, 2019Copper Contributor
I'm not trying to knock anyone for figuring out how to do this, but not everyone is a web dev, nor wants to be, nor should they have to be one. People wanting to send an email to a SharePoint group aren't expecting some completely out of left field functionality. It's good that there are connectors for REST calls and such, but Flow is marketed as a replacement for SharePoint Workflows, and it is touted as something that an average user can use without needing to know how to code. We may fundamentally disagree on some of this, I don't know. If that's the case, so be it, best of luck to you. I just get concerned that all these people cobbling together solutions like this and moving on and marking things as solved is going to help lack of basic features like this slip under MS's radar so to speak.