Forum Discussion
Email a SharePoint Group from Flow?
_api/Web/SiteGroups/GetById(4)/users?$select=Title,Email
once you have that you can use the Outlook send mail action to send an email.
- Joe VolkOct 03, 2018Brass Contributor
Terry Hagan If I use this, where does it store the information for me to be able use it later?
- Terry HaganOct 04, 2018Iron Contributor
It doesn't store anything, the information, user title and email, is already stored in the SharePoint Group for you to use when you retrieve it.
- Brent EllisOct 03, 2018Silver Contributor
Here is what I do for this (I am using this pattern for sending emails and assigning Flow tasks):
1) Initialize a variable of type string called "SendEmailTo"
2) Use the SharePoint HTTP call (i try to do everything using the Group ID)
3) Use the Parse Json action against the body of the SharePoint Http using the schema in the attached file
4) Do an Apply to Each on the body of the Parse Json action, and append the email (IMPORTANT with a semi colon) to your variable. This is will built you a string of email addresses that can be used in the send email action.
SCHEMA FOR PARSE JSON ACTION
{
"type": "object",
"properties": {
"d": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"uri": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"Alerts": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": {
"type": "string"
}
}
}
}
},
"Groups": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": {
"type": "string"
}
}
}
}
},
"Id": {
"type": "number"
},
"IsHiddenInUI": {
"type": "boolean"
},
"LoginName": {
"type": "string"
},
"Title": {
"type": "string"
},
"PrincipalType": {
"type": "number"
},
"Email": {
"type": "string"
},
"IsEmailAuthenticationGuestUser": {
"type": "boolean"
},
"IsShareByEmailGuestUser": {
"type": "boolean"
},
"IsSiteAdmin": {
"type": "boolean"
},
"UserId": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"NameId": {
"type": "string"
},
"NameIdIssuer": {
"type": "string"
}
}
}
},
"required": [
"__metadata",
"Alerts",
"Groups",
"Id",
"IsHiddenInUI",
"LoginName",
"Title",
"PrincipalType",
"Email",
"IsEmailAuthenticationGuestUser",
"IsShareByEmailGuestUser",
"IsSiteAdmin",
"UserId"
]
}
}
}
}
}
}- wendie1970Sep 10, 2021Copper ContributorYou, sir, are a sanity saver!! I spent an afternoon trying to get this schema! Thank you!!
- null nullJul 11, 2018Copper Contributor
Hi,
Can i know how to use Active Directory Security group or Distribution group on Microsoft flow Approval Process.
Please let me know if there is any direct step or any work around to fix this requirement.