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

How to send approval email for time off to supervisor?

We have two lists, TimeOffRequests and Employees. The TimeOffReqeust form has a Person field to select who is requesting time off. The Employee list has a column called Supervisor which is also a person.

 

When the employee complestes a new TimeOffReqeust in Sharepoint we want to send an approval email to his or her Supervisor.

 

Sounds simple but we have tried diong this several ways and none of them have resulted in a working flow...

 

1) Step 1) get the Employee's Supervisor from the Employee list by filtering on the Employee. We tried this but we cannot build a filter expression that is accepted. We can't use Name eq Name becuase (left side is from the Employee list and the right side is from the TimeOffRequest item) because Name or Name ID is not available in the dynamic content pulled from Sharepoint. We tried filtering by Email but then we get an error that "Name.Email", "Name/Email", and "Name\Email" don't exist as a column in Employees.

 

2) We pulled all Employees and tried to apply a condition to each item returned (each Employee) to send an email when the Employee's Email (or DisplayName) match the item's "Name Email" or "Name DisplayName". But the problem here is that you can't send an approval email inside of a foreach that you're using to find which Employee matched the Employee who created the item.

 

Anyone else have any ideas here? Seems like a pretty simple flow but there appears to be too many subtle features missing like the ability to filter on Name.ID or the ability to take the first element from the results of a conditional match to send an approval email to.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi Jyost,

 

I try to create a flow to achieve what you want, but it seems that I got the same results with you.

 

Is the supervisor a Manager? If yes, please consider to use the action “Get Manager” in your flow:

3.PNG


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi Jyost,

 

I try to create a flow to achieve what you want, but it seems that I got the same results with you.

 

Is the supervisor a Manager? If yes, please consider to use the action “Get Manager” in your flow:

3.PNG


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mabel,

Yes! I used the Get Manager step that you mentioned and it's working! Thank you so much for that suggestion. I struggled trying to get this to work by adding the Employee's supervisor to the list and several other approaches. Unfortunately it seems that referncing other lists is currently difficult to do in Flow. But, thankfully we use Office 365 and it's Exchange service so I was able to assign everyone's Manager in Exchange and the flow was able to pull the manager and send the approval to them inside of Flow with no additional issues.

 

Thanks again!

 

John

Hi Jyost,

 

I am glad to hear that my suggestion works for you.

 

Any time you got issues when work with Microsoft Flow, welcome post your issues here, we are always ready to help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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 (4,772)