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 / Prevent Power Automate...
Power Automate
Unanswered

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,223 Super User 2025 Season 2 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard