Citizen Developer
explore our new search
Efficiently Cancel 1-100 Flow Runs with Power Automate
Power Automate
Oct 10, 2023 8:30 PM

Efficiently Cancel 1-100 Flow Runs with Power Automate

by HubSite 365 about Joe Unwin [MVP] (FlowJoe)

Power Platform Lead @ Hitachi | FTRSA, MVP & MCT

Citizen DeveloperPower AutomateLearning Selection

Effortlessly cancel hundreds of Power Automate flow runs with our streamlined solution. Become a Microsoft expert today!

In the YouTube video by Joe Unwin [MVP] (FlowJoe), he introduces the efficient method for managing runs on Power Automate. He highlights the struggle of managing hundreds of runs without an effective cancellation process, which according to him, leads to significant waste of resources and time.


  • Code used in the video:
  • Base Source URL:
  • Azure AD Resource URI:
  • URL of the request:
  • providers/Microsoft.ProcessSimple/environments/ENVIRONMENTID/
  • flows/FLOWID/runs?api-version=2016-11-01&$filter=Status eq 'running'
  • (Replace EnvironmentID and FlowID with the Manual Trigger inputs)
  • Schema:


Linking to more of Power Automate posts can provide you with a better understanding of this Microsoft Flow.

The video offers a step-by-step guide on creating a simple flow to cancel unneeded execution of flows, all done using Power Automate. No extra software or heavy coding is necessary, just minimal input for maximum efficiency.

To back up his method, Unwin offers a demonstration of the URLs and APIs used to monitor and manage the flows created within Power Automate. The codes and methods he uses are user-friendly and adaptable to different scenarios, allowing further customization of the flows.

Unwin dives into a more specific situation where one execution of a flow requires another flow's cancellation. By managing the approval of flow runs, he manages the waiting time and resource usage for high-functioning flow runs. He especially emphasizes the use of the Power Automat Management connector and workflow() expression to handle these more complex situations.

  • The Power Automate Management connector cancellation action requires specific parameters.
  • The workflow expression gathers environmental data about the current flow to optimize the next one.
  • Breadcrumbs are left for users to trace the initiation and cancellation of flows.

Unwin advises further solutions to prevent wastage of resources, such as setting an expiry date for approval flows, and recording flow runs for future references. The video provides watchers with a comprehensive tutorial on efficient resource management via Power Automate.

General Information About Power Automate

Power Automate, formerly known as Microsoft Flow, is an online service provided by Microsoft to help businesses create automated workflows between apps and services. It helps in the automation of repetitive tasks such as data organization, file synchronization, and notification sending. Given its drag and drop nature and pre-built templates, it's user-friendly and doesn't require extensive coding knowledge.

Power Automate - Efficiently Cancel 1-100 Flow Runs with Power Automate

Learn about Cancel Flow Runs (From 1 to 100s) Easily | Power Automate


The YouTube video in discussion primarily expounds upon handling unwieldy 'Power Automate' flow runs, lucidly delineating methods to cancel active flow runs - potentially numbering in hundreds - using a simple flow. Moreover, it demonstrates how to preserve resources by cancelling waiting flow runs within another flow run.

The illustrative code snippets you find in the video come quite in handy. Primarily, it utilizes three URLs: 'Base Source URL', 'Azure AD Resource URI' and 'URL of the Request'. The code is crucial in tweaking the operations; you only need to replace the 'EnvironmentID' and 'FlowID' in the 'URL of the Request' segment with Manual Trigger inputs.

Moving on to 'Power Platform', it's worth noting another attribute of this YouTube procedural guide are the segmented chapters, which feature an in-depth tutorial covering separate phases. The segments run the gamut from Introduction, Trigger run, Workflow data parsing, Data examination, to initiate the cancellation of Flow Runs, all culminating in an integral demonstration.

The latter half of the video is devoted to a specific Flow run cancellation scenario: an active (waiting) Flow run cancellation within another Flow run. Scenarios like these arise commonly when you have to resubmit or restart approval flows. The focus here is on the conservation of resources by eliminating unnecessary, lingering Flow runs with the support of the 'Power Automate Management connector' and an efficacious workflow().

  • ▪ Identifying the Flow run meant for cancellation
  • ▪ Pinpointing an active approval relating to a specific record
  • ▪ Cancelling the identified approval
  • ▪ Ensuing termination of the run.

To enable such an operation, the speaker makes use of the workflow expression in conjunction with the 'Cancel Flow Run' action present in 'Power Automate Management connector'. In this context, the workflow expression facilitates the acquirement of integral information, viz. current flow, run, and environment.

The video provides insights on fine-tuning the process to your preferences and needs. This procedure might require maintaining a traceable record or a 'breadcrumb trail' to identify and choose the Flow run for cancellation. For instance, while setting an approval associated with a 'DataVerse' record, creating connected approvals to the record paves the way for an accurate Flow run cancellation.

In conclusion, the YouTube video furnishes an extensive guide on the cancellation of flow runs within the 'development of Power Automate' and further enhancement of the automated process. It delves into the nitty-gritty of flow run cancellations and how to optimize the process to benefit your resources.


More links on about Cancel Flow Runs (From 1 to 100s) Easily | Power Automate

How to batch cancel flow runs - Power Platform Community
Aug 20, 2022 — How to batch cancel flow runs · 1. Go to the running flow screen, filter by running · 2. Click more at the bottom. Tedious. · 3. Save the page as html · 4. Open the ...
Cancel or resubmit flow runs in bulk in Power Automate
Mar 5, 2023 — Follow these steps to resubmit flow runs in bulk: Sign in to Power Automate. On the left panel, select My flows.


Cancel Flow Runs, Power Automate, Automate Workflow, Batch Cancel Flow Runs, Workflow Automation, Power Automate Flow, Stop Flow Runs, Power Automate Cancel, Cancel Multiple Flows, Automate Flow Cancel.