Skip to main content

Notifications

Community site session details

Community site session details

Session Id : SP1zuLNjm/YUt6FJkA1eDT
Power Automate - Building Flows
Unanswered

On Call Rotation that automatically updates

Like (1) ShareShare
ReportReport
Posted on 25 Jul 2024 14:29:39 by 2
I have a team of 3 developers (devA, devB, devC). We are each on call for a week at a time.
Today we have a recurring message that posts every day at the same time that:
@<OnCall dev> should check on the production checklist.
Oncall rotation ends at <Date>
 
I'd like to automate it to pick the dev from a list or map of options, to automatically change which person it selects each week, and to update the day the rotation ends at.
I'm a complete newbie to Teams Workflows so I'm not sure how to properly declare a map, dynamically select from a map in a message body, or dynamically change the date.

I'd be super grateful for some help.
  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on 25 Jul 2024 at 22:13:50
    On Call Rotation that automatically updates
    You want it to be sequential right? And not for example round robin?
     
    Below is an example for 3 devs.
     
    This example calculates a week number based on today's date with the utcNow function. After that it div(ides) the week by 3. This should return either a 0, 3 or 6 as the first decimal. Using a formatNumber (with the 0.0 format) and a last function to retrieve that part. With a Filter Array action the example matches it against a Rota array.
     
    Rota Array
    [
    {"Name": "DevA", "ID": "0"},
    {"Name": "DevB","ID": "3"},
    {"Name": "DevC", "ID": "6"}
    ]
     
    Where in the Filter Array action
    @equals(item()['ID'], last(formatNumber(div(add(div(dayOfYear(utcNow()), 7), 1), 3.0), '0.0')))
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard
Loading started
Loading complete