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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Shifts and power autom...
Power Automate
Unanswered

Shifts and power automate approvals

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I am new to power automate and trying to find solution for our company when using Shifts app in teams.

Could someone help me and guide how can I assign different approver for different group in shifts?

Currently, everyone that is an owner of the team can approve time off requests.

I want to create a flow that will send the approval request to the responsible manager of the team/group.

 

ex. The time off requests from the Group- Structural engineers should be approved by Tim.

Mechanical engineers requests to be approved by Mary etc...

 

Anyone with experience in this..? I have been creating flows myself, but do not work as I wanted.

 

Thank you

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Delfina,

     

    You could create an array variable with the scheduling group ids and the people who need to approve. From the time off request you could collect the requestor/sender id and match that against the different scheduling groups of that team. The outputs of that can be matched against the array variable. That should give you one single person who can be used to start an approval.

     

    Below is an example

     

    1. When a Time Off request is created, updated or deleted trigger action is used

     

    2. An initialize variable with the approvers mapping

    [
    { "Group":"TAG_4205494a-c2be-48fa-978b-9f0bc3580f8e", "Email": "jane@contoso.onmicrosoft.com" }, { "Group":"TAG_4205494a-c2be-48fa-978b-9f0bc3580999", "Email": "tim@contoso.onmicrosoft.com" }
    ]

     

    3. Get time off request action is used to get details of the request

     

    4. List all scheduling groups of the related team

     

    5. Use a Filter Array to find group which the sender of the Time Off request is part of

    @contains(item()?['userIds'], outputs('Get_a_Time_Off_request')?['body/senderUserId'])

     

    6. Use another Filter Array to find the correct email from the ApproversArray

    @equals(item()['Group'], body('Filter_Array')[0]['Id'])

     

    getapproval_array.png

     

    7. Use the below expression in the Assigned to field of the Start and wait for an approval

    body('Filter_Array_-_Find_Approver')[0]['Email']

     

    8. Use a condition to check if the request has been approved (Approve status).

     

    9. If that is the case automatically approve the the time of request 

     

    getapproval_array02.png

  • Delfina Profile Picture
    8 on at

    Thank you very much for your answer, I have tried but I couldn´t make the flow run without a problem. Maybe I didn´t follow your instructions correctly. But I gave up on it for now. We will not use shifts app because of data protection/ privacy reasons. But maybe that can be a suggestion to the developers of Shifts, to make an option to be impossible for other team members to look at other people´s shifts. At least for the absence request, sick days... But thank you very much for your effort, I will definitely try to make this flow pattern work.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard