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:
Note: I assume that the user Test3@xxxxxx.xxmicrosoft.com is the lowest level member within your Organization chart.
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:
The flow works successfully as below:
More details about using expression in flow actions, please check the following article:
More details about the Configure run after option, please check the following article:
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.
Can you post a screen shot of your do until loop?
Check out new user group experience and if you are a leader please create your group
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.