Suspend MS Power Automate

Temporarily disable Power Automate Trigger

Premise

In this post we’ll discuss how to temporarily prevent MS Power Automate from getting triggered. We will disable it for sometime and then resume the same without much of a hassle.

The reason to suspend a Power Automate can vary depending upon a wide variety of use cases. One such prominent use case is to disable the flow while bulk updating a SharePoint list from a background service/process. While executing a batch request, we may not want to trigger the flow and send unnecessary emails to the stakeholders!

Solution

For this post, we’ll be using the SharePoint trigger, When an item is created or modified. It is a Polling trigger. Which means that it will continuously poll our SharePoint list, in a certain time interval. If any change is found then, our flow gets triggered.

Polling flows, when turned on, will process all the pending events. So, by default, if we turn off the flow, do a bulk update and, restart it, the flow will process each item modified during the batch update!


To prevent this behavior, we’ll leverage the use of a special setting, Trigger Conditions.

  • Go to the MS Power Automate trigger. Select More Options icon -> Settings.
MS Power Automate Trigger Setting
  • Under Trigger Conditions, provide an impossible condition for the flow to run. For ex, is 1 equals to 0?
    Since, the condition will always be false, the flow will not run for any of our bulk update changes. Following is its syntax.
@equals(1, 0)
MS Power Automate Trigger Condition
  • Select the Done button and Save the flow.
  • Run our Batch Update.
  • Once done, remove the trigger condition from the flow.

Key Takeaways

  • This is a little hack, where we’ll set an impossible condition for the flow to run. Since, the condition will never satisfy, the flow will not be triggered for the items updated during the batch request.
  • Once the batch update is completed, we can again remove the Trigger Condition and thereby, enable the flow. It will not start processing the batch request items as they had already been processed. It’s just that the flow was not triggered for any of them.
  • We can learn more about the Trigger Conditions, here.
  • Also, be sure to remove the impossible Trigger Condition once the batch update is done! 😉

2 thoughts on “Temporarily disable Power Automate Trigger

  1. Awesome post! I just discovered this weird power automate idiosyncrasy, glad you have a solution!

    Like

  2. Just curious, is there a reason why you wouldn’t just disable the Power Automate flow on the ribbon option clicking “Turn Off” and later clicking “Turn On”?

    Like

Leave a comment

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