Skip to main content

Notifications

Community site session details

Community site session details

Session Id : yZhndBgQVbyC4SMxL5otAY
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,709 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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 148 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 144 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 131

Overall leaderboard
Loading started
Loading complete