I have two SharePoint Lists.
SharePoint List A contains information and gets information added to it.
Example
Name | Title | Age |
---|---|---|
Bob | Clerk | A |
Sally | Clerk | B |
SharePoint List B contains information that won’t be changing very often.
Example
Name | Department | |
---|---|---|
Jerry | Purchasing | jerry email |
Beth | Security | beth email |
Joan | Security | joan email |
Anytime a new item is added to SharePoint List A, anyone within the Security Department from SharePoint List B must receive an email with information from the row that was just added.
I’m having trouble pulling the correct emails that have the Security tag.
- Step 1 Trigger – When an item is created – Item added to SharePoint List A – Good
- Step 2 Get items – Gets items from SharePoint List A – Good
- Step 3 Get items – Gets items from SharePoint List B – Good
- Step 4 Select – selecting Department and Email from SharePoint List B
- Step 5 Filter Array – Filter Query is set to Department/Value is equal to Security
- Step 6
- Step 7 Send an email to those with Security Department with SharePoint List A new item information.
I am stuck on what to do for step 6. Any ideas would be great. I’m open to other recommendations on what to try as well.
Hirstmj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
other approach: make a Sharepoint group in the site like the site members with these security tagged users, then you can get their emails via an ‘Send an HTTP request to SharePoint’ action:
{
"parameters": {
"dataset": "https://...sharepoint.com/sites/...",
"parameters/method": "GET",
"parameters/uri": "_api/web/siteGroups/getByName('GROUPNAME')/users"
}
},
then extract their email addresses with a ‘SELECT’ action:
{
"inputs": {
"from": "@body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']",
"select": "@item()?['Email']"
}
}