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
draftShiftexists in the shift object -
Filtering shifts by
lastModifiedDateTime >= utcNow() - 5 seconds -
Comparing
createdDateTimetolastModifiedDateTime -
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.

Report
All responses (
Answers (