Introduction
In this article we will learn about automating WFH notifications to colleagues via email through Power Automate.
Step 1
Go to https://flow.microsoft.com/
Click on Instant--from blank
Step 2
After clicking Instant-from blank in the popup select "Manually trigger a flow" option and click create.
Step 3
Click on next, find and select the “Get My Profile (V2)” action.
Step 4
Click on next, find and select the “Get Manager (V2)” action.
Step 5
Expand Get Manager Connector box and select "UserPrincipleName" in User (UPN) Textbox or in expression
body('Get_my_profile_(V2)')?['userPrincipalName']
Step 6
Click on next, find and select the “Get Direct Reports(V2)” action.
Step 7
Expand Get Direct reports Connector box and select "Mail" in User (UPN) Textbox or in expression
body('Get_manager_(V2)')?['mail']
Step 8
Click on next, find and select the “Intialize variable" action.
Step 9
Expand Intialize varaible box and enter "ColleagueEmail" in Name Textbox and choose type as string.
Step 10
Click on Next Step and find and select the “Apply to Each” action.
Step 11
In "Apply to Each" box set value from previous output.
Step 12
Inside "Apply to Each" box Click on Next Step and find select the “Append to string varaible” action.
Step 13
Expand Append to string variable box and Select "ColleagueEmail" in Name Dropdown and in the value textbox click add dynamic content-->expression tab and enter collwing code.
concat(items('Apply_to_each')?['mail'],';')
Step 14
Click on Next Step and find and select the “Send an Email V2” action.
![Send WFH Intimation To Colleagues]()
Step 15
Set the email address from the output of "ColleagueEmail" and set the subject and email formatting as per your needs.
Step 16
Click on Save Flow.
Step 17
To test the flow, click on the Test button from the right side of the top menu and click the Run flow button. Then click the done button and verify the email .
Step 18
Expected output
Conclusion
Hence we learned about how to automate work from home notifications using power automate (Formerly MS Flow). I hope this helps someone, and happy coding.