capabilities.work

Cancel an In-Flight Run

A 3-step recipe with Microsoft Power Automate. We can help you get access.

Recipe · 3 steps

Cancel an In-Flight Run

Cancel a flow run that is still in flight.

  1. List the flow's run history and branch on whether any execution is still in flight. A history of only terminal runs means there is nothing to cancel.
  2. Re-read the candidate run immediately before cancelling. A long-running run can complete between the list and the cancel, and cancelling a finished run is a no-op worth avoiding.
  3. Cancel the confirmed in-flight run. The flow stays active; only this single execution is stopped.
What you'll need to have ready
  • environmentName: The name of the environment holding the flow.
  • flowName: The name or ID of the flow whose run should be cancelled.
For your developer

Arazzo workflow microsoft-power-automate:cancel-running-run, 3 operations: listFlowRuns → getFlowRun → cancelFlowRun. Specs on APIs.io.