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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Prevent Power Automate...
Power Automate
Suggested Answer

Prevent Power Automate from triggering on all historical ms team shifts when publishing shift?

(0) ShareShare
ReportReport
Posted on by

I'm building a Power Automate flow using the trigger:
“When a Shift is created, updated or deleted” from Microsoft Teams Shifts.

 

My goal is to take action (e.g., create a ticket) only when a newly drafted shift is published, not when older shifts are updated.

 

However, when I click “Share with team” to publish a newly drafted shift, the flow gets triggered multiple times — once for every existing shift in the schedule, even those I didn’t modify. This causes unintended behavior, such as duplicate ticket creation for old shifts.

 

So far, I’ve tried:

 

  • Skipping if draftShift exists in the shift object

  • Filtering shifts by lastModifiedDateTime >= utcNow() - 5 seconds

  • Comparing createdDateTime to lastModifiedDateTime

  • Even checking for keywords in the shift notes

 

The main issue is:
Power Automate processes all the old shifts first, and only reaches the one I just published last, making time-based filters ineffective.

 

My question is:

 

Is there a reliable way to detect only the one or more shifts that were just published, and ignore all unrelated republished shifts triggered by the “Share with team” action?

 

Any insights into best practices or Microsoft-supported solutions for this specific Shifts behavior would be appreciated.

Categories:
I have the same question (0)
  • Suggested answer
    ANB Profile Picture
    7,250 Super User 2026 Season 1 on at
    Hi @NC-30051748-0, Try using Trigger condition for "When a Shift is created, updated or deleted" trigger. PFB more information on Trigger condition:
     
     

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.


    Thanks,
    ANB

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard