Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Infinite loop

(0) ShareShare
ReportReport
Posted on by 4

hi Microsoft community 

I'm encountering an issue with a Power Automate flow that involves two triggers: one for when an item is created or modified with the status 'assigned,' and another for when the status is 'completed.' The purpose is to send an email notification to the sender in both cases. However, I'm facing a problem where the trigger for 'completed' status is causing an infinite loop and continuously sending emails.

Here's a summary of the situation:

  • Trigger 1: When an item is created or modified with the status 'assigned,' the flow works correctly without any infinite loop or excessive emails.
  • Trigger 2: When the status changes to 'completed,' which uses the same trigger logic as the 'assigned' status, the flow enters an infinite loop, persistently sending emails until manually turned off.

I have already reviewed the flow logic, trigger configurations, and actions, but I haven't been able to identify the cause of this issue.

I would greatly appreciate your guidance and expertise in resolving this problem. Is there a recommended approach or workaround to ensure that the flow for the 'completed' status functions correctly without entering an infinite loop?

I attached the condition for both assigned and completed 

  • Expiscornovus Profile Picture
    31,643 Most Valuable Professional on at
    Re: Infinite loop

    Hi @Nawaf-,

     

    Thanks for sharing that additional information. Still not sure how this setup could cause an infinite loop. I am not seeing any actions in your setup which could case that. 

     

    That being said, we can build in some additional checks to make sure the value has actually been changed since this last version of the item. 


    Can you try the below?

     

    1. Add a Get changes for an item or a file (properties only) action. Make sure you use the ID, Trigger Window Start Token and Trigger Window End token for the configuration.

     

    getchangesforitem.png

    2. Add a new row to the Condition. Make sure it is in the first spot and it is using an AND. In that row you can check if the Has Column Changed: Status field is equal to true.

     

    hascolumnchanged_status.png

     

     

  • Nawaf- Profile Picture
    4 on at
    Re: Infinite loop

    I have included the flow and running process files below. I used the properties exclusively. However, I'm encountering the same issues. Interestingly, I employed the same flow for the 'assigned' process, and it worked perfectly. Unfortunately, when it comes to the 'completed' process, it gets stuck in an infinite loop."

  • Nawaf- Profile Picture
    4 on at
    Re: Infinite loop

    .

  • Expiscornovus Profile Picture
    31,643 Most Valuable Professional on at
    Re: Infinite loop

    Hi @Nawaf-,

     

    Normally an infinite loop could be cause if you trigger a flow when an item is created or modified and you are updating the item as well in the same flow. In your screenshot I don't see any update item action? 

     

    The only thing I see is the flow is checking is if a Status value is equal to Assigned in a condition action. It does not check if that Status value field actually has changed (so potentially that could case an infinite loop, if your are using an update item action as well).

     

    Normally I would suggest to use a Get changes for an item or file (properties only) action for this. That action should output if a field has change since the last version with either true or false.

     

    Can you share a larger screenshot of your whole flow setup, by any chance?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow