Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Duplicate Flows When an item is created of modified

(0) ShareShare
ReportReport
Posted on by

I have a simple use case that's turning out to be much more complicated to "code" than I signed up for.  Essentially, I'm creating a Purchase Order Request solution using a SharePoint list with versioning and content approval enabled.

 

The approval process kicks off using the "When an item is created or modified" SharePoint Connector trigger and makes use of the Approvals Connector to update the Content Approval Status according to the administrator's response to the Approvals Connector message.  Once the admin selects Approve or Reject from the message, the flow then updates the item's Content Approval Status according to the response using Conditional Cases for Approve and Reject.

 

This all works fine and the Content Approval Status changes in the list item with the approver's comments, but because a "new" modification to the SharePoint item ensues by updating the Content Approval Status field, the original flow invokes a second flow, and hence another Approvals request for an item that's already been triaged and actioned on.

 

In order to get around this, I added a Condition at the beginning of the flow that checks whether or not the Content Approval Status field is already in an Approved or Rejected state and immediately terminates the recursive flow if it is.  This seems to work, but also convolutes the logs with two flows per trigger.  And when I add email notifications to the mix, multiple emails end up firing as a result.

 

Is there some built in mechanism that can be leveraged to avoid this duplicate flow behavior?  I really wish there was a trigger for when an item is created and another for when an item is modified.

  • Community Power Platform Member Profile Picture
    on at
    Re: Duplicate Flows When an item is created of modified

    @ScottShearer , the Created field eventually updated.  Thanks for your help!

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Duplicate Flows When an item is created of modified

    Hi @Anonymous ,

     

    Glad that your problem could be solved by @ScottShearer 's suggestion to add the trigger condition.

    And for the Created Date field that you mentioned, I agree with @ScottShearer that you could wait for a while and refresh the page.

    Also if your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Duplicate Flows When an item is created of modified

    @Anonymous 

    I suspect that if you wait a while and refresh the screen the created dat/time will change form "a few seconds ago".

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Duplicate Flows When an item is created of modified

    @ScottShearer , disregard the syntax issue, it's most likely because I'm a newbie to the expression language.  After a few hours of troubleshooting and reading up on the syntax, I noticed that the apostrophes encapsulating my column name were off.  You can't use "open/close" apostrophes, they have to be "straight" ones.  I highlighted the difference below:

    You had this in your guide: @equals(triggerBody()?[StopRun],null)

    This change was required for the interpreter to accept my syntax: @equals(triggerBody()?['StopRun'],null)

     

    In any case, I ran a few flows and haven't seen any dupes, but noticed that the Created date is now constantly displaying as "A few seconds ago" instead of the actual creation date.  Is that a known side effect of the trigger expression?

     

    FlowDupeInhibitor Created date issue.png

  • Community Power Platform Member Profile Picture
    on at
    Re: Duplicate Flows When an item is created of modified

    @ScottShearer , thanks for the info.  I created the hidden column and added the expression, substituted with my custom column name, but the Flow Checker is throwing an error:

     

    Trigger Condition Expression ErrorTrigger Condition Expression Error

  • Verified answer
    ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Duplicate Flows When an item is created of modified

    @Anonymous 

    Here is a link to a blog post that I wrote that I believe will provide a solution to your issue.

     

     

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 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow