In this video on Avoid infinite loops with flow trigger conditions in Power Automate we will cover the following:
1. Preventing infinite loop/race condition – Same item is modified within the flow.
2. Trigger flow when a column value is updated.

Conditionally trigger your flows.
Save flow runs and api calls by only triggering your flows as and when required based on a condition.

There are daily api call limits per licensed user account for a 24 hour period.
https://docs.microsoft.com/en-us/power-platform/admi/api-request-limits-allocations

Saving api calls is key to utilizing flow effectively and ensuring you build flows that are called only when required.

#Buildingflows #Optimizeflows #Saveapicalls #triggerconditions

30 Comments
  1. ashutosh singh 11 months ago

    Hey @Reza, Is it possible to send an email from the person's account who created the item in share point list not default from the person who created this list or flow.

  2. Alfred Meza 11 months ago

    Thanks a lot for this great tip!. Just a question, so it means that if I have 9 actions and 1 trigger in my flow, that will use up 10 API calls out of the 2K whenever it runs?

  3. Pras Bhaskaran 11 months ago

    Hey @Reza great video. We are using Automate to create a record into a new List based a change to a field in an existing List. Quick question when testing this solution with my PowerApp the Power Automate generates two identical items when run. Not sure why its doing this? Is this something you have encountered in the past? Any help with this would be gratefully accepted.

    Thanks,

    Pras

  4. Rob Versteeg 11 months ago

    Really helpfull video, i just had this scenario yesterday 😋

  5. MARY MARGARET 11 months ago

    Hey @Reza great video. is this scenario work for attachments ? means first time we added 2 attachments,and later if we delete one attachment in edit mode, can we keep track on that?
    Thanks in advance…

  6. Ger Fer 11 months ago

    Thanks- I have to get into “ant” mode and save it for a rainy day

  7. Jeana 10 months ago

    This is a great video. Thank you so much for sharing. I'm going to use this for sure. I have a scenario I'm stuck at, not sure if you can point me in the right direction. If I have an end date and if that end date has arrived, I'd like to use that as a trigger to send an email to the original creator of that entry. I can't seem to get the condition statement to work. It fails each time. Is there some kind of limitation with these conditions related to dates? I saw something about tick function but I don't fully understand. Do you have any pointers? Thanks so much in advance.

  8. Harshil Patel 10 months ago

    Really helpful.
    I'm trying to send mail from excel (columns are usermail, username, reminder.) which is hosted on sharepoint.
    I've successfully sent bulk mail from excel as well.
    But, How can I send mail when someone (admin) add new row entry and flow has to mail them automatically without re-sending mails to previous user…???? it is possible in flow..????

  9. Shone Karthanal 10 months ago

    Thank you so much for this video! You saved me a lot of pain as I was not understanding why it would re-trigger. SharePoint Designer didn't need this extra programming.

  10. Maximilian Hofmann 9 months ago

    Thank you really much. I’m really sure that most of the companies are not aware of the api requests limitations. Especially with the retirement of the SharePoint 2010 workflows, many users will run into problems. So hopefully Microsoft Lists and it rules can help here also a little bit.

  11. Hakim Muhiddin 9 months ago

    "@not(equals(triggeredBody()?['Editor']?['Email'],'____________')) You're welcome

  12. Nilesh Birari 8 months ago

    Really nice video its helpful for me to resolve infinite loop.

  13. Loek Lucassen 8 months ago

    Top scenario! I only had to figure out this works for Choice-type column (in your video Category column). But I am very happy with the result. Thanks!

  14. sateesh vybaina 8 months ago

    can you please send Trigger condition text, bez am unable to see clearly on Video…Thank you

  15. Myle Luong 7 months ago

    Hi Reza

    I think your solutions to avoid the infinite flow run is so great. I applied to my flow and received the errors msg below:

    The power flow's logic app flow template was invalid. The template condition expression 'not(equals(triggerBody()?['Editor']?['Email'],'mimi@american.edu'))' at line '1' and column '90806' is not valid template language expression.

    Would you please help me to fix this? Much appreciated your help!

  16. pradipta nayak 7 months ago

    Hi Reza you catch nice point on Api call..so if I am using Flow connector in Powerapp to retrieve data from other system does it consume API calls ? So if create Custom connector instead of Flow connector does it saves me ? From api calls

  17. Thomas Poth 7 months ago

    This is really helpful stuff, thank you so much!

  18. Taranbir Singh Dulai 7 months ago

    Hi Reza – can we do conditional trigger based on a particular date ? E.g. trigger email only if selected date was after 10-Oct-2020

  19. Betty Stolwyk 6 months ago

    In your second example (run flow only when a specific column changes), won't you be back to the infinite loop issue of updating the list item that had triggered the list flow because of an update to it? (since you removed the trigger condition that compared the person running the flow to the service account)

  20. Jaina Nica Bongulto 6 months ago

    Thanks for this tutorial. This is really helpful and useful. Just to ask if how can I achieve if specific field has no value and workflow will not trigger?

  21. Jared Waterman 5 months ago

    Can you use a trigger expression within the trigger for when a certain SP List item is updated with certain selection or a word? My switch and control conditions do not work if inserted into the flow after the trigger.

  22. ananda sanyal 5 months ago

    Hello Reja, Thank you for sharing, It's very helpful. I've question on flow sharepoint item modified trigger. If I use this and send email, Modified by columns is updated by the flow user and in email it shows – Updated by flow user. Where as this items is updated by some other user. How to get the user name, who is edited the item in flow. Appreciate any suggestion/ help on this. Thank you.

  23. Ashish Kalmegh 4 months ago

    Nice Video @Reza. On similar path I am facing one challenge.
    1. I have one PowerApp from which I am triggering flow on add/update item in SharePoint list.
    2. Then approval starts on new/updated item using flow. However, before "Update Content Approval" flow I am using "Update Item" because of some business logic. Which then starts the trigger.
    I want to block that trigger for 3rd time, because I am not updating the content status before that.

    Current Flow triggers on,
    1. Item add/update
    2. Trigger is running more than once after using "Update Item"

    Query,
    1. Is it necessary to have update content approval status in lists?

    2. In above situation how to block if power app and flow are using same service account.
    Thanks in advance 🙂

  24. Mark Whenman 4 months ago

    Why is this SO much more complicated than using the Workflows in SPD ? as a non programmer Power Automate has been a constant struggle and is extrordinarily disappointing. A 5 min workflow has now been replaced with power automate, power apps and adding triggers and coding to ensure that a workflow doesnt repeat. MS have dropped the ball incredibly on this. Thanks for your help.

  25. chris norris 4 months ago

    Awesome Video… but for some odd reason, im still getting the infinite error. I added a column called "Audit Date" which is a date field based on a column called Audit Status (Pass or Fail). Once the user updates the Audit Status, i want the Audit Date to update to today's date. Followed this and as soon as i setup the Update Item piece in PA, i get the Infinite error again. Maybe my trigger on the new or modified item piece is not right – equals(triggerBody()?['runtheflow'],'yes')?? Im trying to also figure how to set that date field, but before that, im still getting the infinite error first…….

  26. Nitesh kumar 3 months ago

    Really really helpful video! Subscribed already. One if the rare video which does not have any dislike.
    Kudos! You are doing an amazing job!

  27. Douglas Hill 3 months ago

    Reza, if you could please help it would be greatly appreciated, I have a flow where the trigger is when file is created or modified. When a document is added it is in a checked out state while meta data is assigned, once that meta data is assigned it checks the document in and goes through the approval process, however, if an approver modifies the document, it runs the flow again, is there a trigger condition that will prevent the flow from being run again despite edits/changes being done to the document, my only current trigger condition is below (column choice)

    @equals(triggerBody()?['Type_x0020_of_x0020_Request']?['Value'], 'Change')

  28. SayonaRAP 3 months ago

    Mine doesnt start the flow for the first time.. after using the code, I want to be able to run the code only once..

  29. Jaina Nica Bongulto 3 months ago

    how about if i have group of people who wish not to re-route the workflow when they modified a certain item in sharepoint? how can i do that?

  30. Alex 3 months ago

    Hi Reza,
    how can I prevent the users updating the colum runttheflow by using ms access for example. I can disable the quick edit, but how can I lock the scenario with ms access and allow only this published form with invisible fields?

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

©2021 TDG - We Are Back Baby!

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending
or

Log in with your credentials

or    

Forgot your details?

or

Create Account