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 / How can I fix Infinite...
Power Automate
Unanswered

How can I fix Infinite Trigger loop

(1) ShareShare
ReportReport
Posted on by 164

This is my flow.  I put Terminate as the last step but it still has an infinite trigger loop in the Update Item Steps 

SharonS_0-1720402732068.png

When I used update item in an approval flow I did not get an infinite trigger loop because of the approval flow.  The trigger is when an item is modified or created.  The condition is if Due Date is less than [Today] then update the Status Column to Late.  It does that but it does it repeatedly.  I have a terminate step.  I don't know why it is an infinite trigger.   The flow runs and the Update field is populated but it keeps running.

SharonS_0-1720403375595.png

 

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @SharonS 

    You need a trigger condition

    Trigger conditions - just what I needed - Powering your Apps (sudeepghatak.com)

     

  • Muzammil_069506 Profile Picture
    292 Moderator on at

    Hi @SharonS 

     

    The way it has been shown  if the update is happening on the same list  in some column it keeps on triggering the email as it goes into infinite loop ,so if you want to trigger flow only if value of column changes to certain value kindly add trigger condition do let me know if you need any help or please accept my answer as solution

  • SharonS Profile Picture
    164 on at

    @SudeepGhatakNZ 

     

    I reviewed your article and tried it on my flow.  

     

    Here is what I have

    @lessorequals(triggerOutputs()?['body/Class1DueDate/Value'],'[Today]')

    SharonS_1-1720449737105.png

     

     

    This is the error message:

    Unable to process template language expressions for trigger 'When_an_item_is_created_or_modified' at line '1' and column '23310': 'The template language function 'lessorequals' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'

     

    I also need the flow to run if the opposite is true

    SharonS_0-1720449687887.png

    What do you recommend?

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Upon reviewing your flow logic, it appears that you can resolve the issue by changing the trigger to a recurrence trigger that runs each morning. Additionally, there is an error in your date comparison. The expression in the condition is "utcnow()". [Today] works in SharePoint calculated columns but not in Power Automate. The following flow logic should work correctly without a trigger condition.

    SudeepGhatakNZ_0-1720475074375.png

     

  • SharonS Profile Picture
    164 on at

    @SudeepGhatakNZ   Thank you!  I made the changes and it worked 🙂

     

    The only odd thing is though the flow succeeded, the flow history said it failed because it didn't like the condition but it ran anyway.  I'm good with the solution.  The condition was met. I added an email to the user on each side of the condition.  Email went out and the column updated perfectly.    Thank you!

     

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    It failed because you have a terminate action. Remove it and you will be good.

     

  • SharonS Profile Picture
    164 on at

    @SudeepGhatakNZ 

     

    I created a new flow as a scheduled flow and did not have the terminate step.   

    SharonS_1-1720629479846.png

     

     You can see it "failed" but continued and the flow completed the task.   This is the error details for the Condition step: Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'less' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'.

    SharonS_0-1720629259572.png The "Yes" condition was met.

    SharonS_2-1720629551943.png

    Appreciate your help

     

    Sharon

     

     

  • SharonS Profile Picture
    164 on at

    @RiotCharlie_199  It will be quicker for you to see the progression of the flow here. Sudeep fixed the infinite loop issue.  The output is an email to the Staff member giving the status of each class.  Consider having the body of the email containing a link to the SP list rather than using an excel spread sheet.  As a user completes the class on time, remove the due date for that class so that the status column will remain "On Time" for that class.  This is the first iteration.  The next iteration will remove the manual step of clearing the Class Status column when a user completes a class on time.  Sorry if this is a clunky right now.  This would be the SharePoint list.  Add a link to the list in the email to the user. 

    SharonS_0-1720636332252.png

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Your flow needs to handle the cases where ActionOn date is null.

    To handle the cases where ActionOn date might be null in your Power Automate flow, you can add a condition to first check if ActionOn is null and then, if it is not null, compare it with utcNow().

     

     

     

  • SharonS Profile Picture
    164 on at

    @SudeepGhatakNZ 

    Hello,

    Is this what you're saying to do?

    SharonS_0-1720741408464.png

    It still gives me fails even though the flow worked.

     

    Regards,

    Sharon

     

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