I'm brand new to this so forgive me please for not understanding something that is probably very simple. I have built a flow to request approval for vacation time. In the Assign to: field I want add an If statement for who it is assigned to based on who has sent it in. All Staff approvals will be assigned to the line manager, but the line managers approval will have to go to the general manager.
I have the statement like this:
@Nunzie you could do something like this in your flow.
1. When the request arrive, get the response details (if you are using Microsoft Forms for the request).
2. Add an Office 365 Users Get Manager (V2) action and select Responder's Email from the dynamic content. That will get the manager of the person who submited the request.
3. Add a Start and wait for an approval and in the Assigned to field select Mail from the Get Manager (V2) section of the dynamic content.
Add a condition of Outcome is equal to Approve.
In the If yes channel add another Get Manager (V2) action but this time select Mail from the first Get Manager (V2) action. That will get the manager's manager and you can then send an email to them with the details of the approval.
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
I had my flow working slightly different, but if I change it to this way, can I ask where the Get Manager action is actually getting the managers email from just based on the request?
For the initial approval the Get Manager (V2) is getting the manager's email from Responder's Email which you select in dynamic content (see the third action in my first screenshot above). The supervisor's email is got from the first Manager's Mail.
Thanks for your reply. I saw your screenshots, but it's sort of missing the point of what I am trying to do, or I am misunderstanding you. If so, apologies.
But users aren't using a form to make the request, they can either go directly to the list itself, or use a power app. My question still remains though, in the get response details step and the get manager step, I don't know how it knows the managers email to get it based on the form completion. Where does it pull that from?
I just thought it would be simple to put an IF statement in the Assign to field as if they are from one specific person Manager A responds otherwise Manager B will respond to all others. Basing it on the requester name.
Check out the on demand sessions that are available now!
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.