web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : JrbNOZ6yX9Y6Nf3SEdwOa8
Power Automate - Using Flows
Unanswered

how can one send mail to manager based on the organization chart

Like (0) ShareShare
ReportReport
Posted on 18 Apr 2018 12:39:47 by 18

My requirement is to send escalation mail at each level in organization chart.

 

  • shalini Profile Picture
    18 on 14 May 2018 at 06:54:34
    Re: how can one send mail to manager based on the organization chart

    Please find the screenshotsManagerApproval.png

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on 11 May 2018 at 12:25:40
    Re: how can one send mail to manager based on the organization chart

    Can you post a screen shot of your do until loop?

  • shalini Profile Picture
    18 on 11 May 2018 at 10:44:30
    Re: how can one send mail to manager based on the organization chart

    I am facing an issue while sending mail to managers in an organization recursively at top level.

    the flow failed at last when flow cannot find the top level manger's manager.

    How can be overcome this situation where the manager's manager does not exist.the flow does not give successfull run even though it reaches to the top level in hierarchy. when get manager fails.Manager.png

     

  • shalini Profile Picture
    18 on 19 Apr 2018 at 06:15:11
    Re: how can one send mail to manager based on the organization chart

    Thanks both of you.I will try it and let you know about it 

  • v-xida-msft Profile Picture
    on 19 Apr 2018 at 04:57:38
    Re: how can one send mail to manager based on the organization chart

    Hi @shalini,

     

    Could you please share more details about your scenario?

    Do you want to send an email to the Manager within your Organization?

    Further, could you please share more details about your organization chart?

     

    I agree with @ScottShearer's thought almost. You could add the "Get manager (V2)" action of Office 365 Users connector within your flow to get the manager profile of a specific user, then send an email to the Manager based on the Mail dynamic content of the "Get manager (V2)" action.

     

    I have made a test on my side and please take a try with the following workaround:

    • Add a proper trigger, here I use Flow Button trigger.
    • Add a Variables-> "Initialize variable" action, Name set to InitialUser, Type set to String and Value set to Test3@xxxxxx.xxmicrosoft.com

    Note: I assume that the user Test3@xxxxxx.xxmicrosoft.com is the lowest level member within your Organization chart.

     

    • Add a Do Until action, within Condition box, click "Edit in advanced mode", type the following formula:
    @empty(variables('InitialUser'))
    • Within "Do Until" action, add a "Get manager (V2)" action, the User (UPN) field set to InitialUser variable. Add a Parallel branch action, within left branch, add a "Send an email" action, To field set to Mail dynamic content of the "Get manager (V2)" action, then add a "Set variable" action, Name choose InitialUser, Value set to Mail dynamic content of the "Get manager (V2)" action.

             Within right branch, add a "Set variable" action, Name choose InitialUser, Value set to null expression. Then click "Menu" button-> "Configure run after" option, within the "Set variable" should run after panel, select has failed option as below:11.JPG

     

    Image reference:12.JPG

     

    13.JPG

     

     

    The flow works successfully as below:14.JPG

     

    More details about using expression in flow actions, please check the following article:

    https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

     

    More details about the Configure run after option, please check the following article:

    https://flow.microsoft.com/en-us/blog/error-handling/

     

     

     

    Best regards,

    Kris

     

     

     

     

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on 18 Apr 2018 at 22:32:10
    Re: how can one send mail to manager based on the organization chart
    You should be able to use the Get Manager action to retrieve anyone's manager assuming that Office 365 knows your org chart.

    Can you be a bit more specific about your requirement?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Featured topics

Restore a deleted flow