cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hsparg008
Frequent Visitor

Access Microsoft Organization to Add Emails

I'm trying to send an email notification when a new SharePoint list item is added. In the SharePoint list, there's a section for whether or not the email notification should include the lead engineer's manager and director.

 

If this is selected "yes," I want to be able to access the engineer's manager and director through the organization that pops up when you hover over a contact. Is there a way to do this?

 

I attached a screenshot to show the contacts I want to grab.

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
hsparg008
Frequent Visitor

I figured out how to accomplish this and wanted to add in case someone looks in the future. There's a "get manager" option you can select:

hsparg008_0-1657136565190.png

In this function, enter in the user's email. I entered in the Lead Engineer's email since this is the manager I wanted. This will retrieve that user's manager.

hsparg008_1-1657136619487.png

To get the director (the manager's manager), I did the same thing, but this time pulled in the "mail" from the previous function. 

hsparg008_2-1657136657422.png

 

To decide whether or not to send, I created two variables and initialized them with a blank email "noreply@noemail.com"

hsparg008_3-1657136705972.png

Then, there are two parallel conditional statements. If the user selected that they wanted to contact the manager or director, the box in the SharePoint list will have a checkmark, or not be blank. Therefore, if the entry isn't blank, the email will be changed to the pre-defined manager or director's email.

hsparg008_4-1657136778013.png

Finally, in the email the manager and director are always cc'ed; however, if they're not filled in, it will be sent to a blank email (noreply@noemail.com).

hsparg008_5-1657136853812.png

 

 

 

 

View solution in original post

1 REPLY 1
hsparg008
Frequent Visitor

I figured out how to accomplish this and wanted to add in case someone looks in the future. There's a "get manager" option you can select:

hsparg008_0-1657136565190.png

In this function, enter in the user's email. I entered in the Lead Engineer's email since this is the manager I wanted. This will retrieve that user's manager.

hsparg008_1-1657136619487.png

To get the director (the manager's manager), I did the same thing, but this time pulled in the "mail" from the previous function. 

hsparg008_2-1657136657422.png

 

To decide whether or not to send, I created two variables and initialized them with a blank email "noreply@noemail.com"

hsparg008_3-1657136705972.png

Then, there are two parallel conditional statements. If the user selected that they wanted to contact the manager or director, the box in the SharePoint list will have a checkmark, or not be blank. Therefore, if the entry isn't blank, the email will be changed to the pre-defined manager or director's email.

hsparg008_4-1657136778013.png

Finally, in the email the manager and director are always cc'ed; however, if they're not filled in, it will be sent to a blank email (noreply@noemail.com).

hsparg008_5-1657136853812.png

 

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,962)