← Al Davies, 250 High Street

Stop a flow early with Terminate in Power Automate

Short answer: add the Terminate action when a flow should stop right there. Pick the status that matches the truth. Use Failed when something went wrong, so the run shows as failed. Use Succeeded when stopping early is a normal, expected result. Use Cancelled when you stopped on purpose and it was neither a success nor an error. Add a code and a message so the next person knows why.

What Terminate does

Terminate ends the run. Microsoft's Power Automate page on error handling says: "Add the Terminate action when you need to stop the flow due to an error." It adds: "The Terminate action can set a status to determine the next step to take."

The Azure Logic Apps page for the same action lists the status choices. Logic Apps and Power Automate are related but are not the same product, so treat this as a guide and look at the action on your own screen. That Logic Apps page says the action "stops the run for a workflow instance, cancels any actions in progress, skips any remaining actions, and returns the specified status." It lists the status as: "The status to return for the run: "Failed", "Cancelled", or "Succeeded"". Your Terminate card should show the same three words. Exact names may differ.

Why the status matters

Run history is where you go when someone says "the flow did not work." You open https://make.powerautomate.com, select My flows, open the flow, and look at the 28-day run history. Microsoft's troubleshooting page says that by default you can look at the "Start, Duration, and Status columns" there. If a flow stops early on a real problem but the run shows as a success, you will not look at it. If a flow stops early for a normal reason but shows as failed, you will see red rows that mean nothing and you will stop trusting them.

Our advice, not a Microsoft rule: pick the status by asking one question. Did the flow do the job it was built to do?

  1. Yes, the job was not needed this time. Example: the item was already approved. Use Succeeded.
  2. No, something broke or data is missing. Use Failed.
  3. No, and it was a choice, not a fault. Use Cancelled.

Step 1. Decide where the stop belongs

Put Terminate after a check. The check is a Condition action. For example, a flow runs when a list item is created. The first Condition asks: is the Amount column filled in? If it is empty, there is nothing to approve. One branch of the Condition holds a Terminate action. The other branch carries on with the real work.

You can also leave the "if no" branch empty and put the work only in the "if yes" branch. Our advice, not a Microsoft rule: use Terminate in the stop branch when the run history needs to say why the flow stopped. An empty branch ends the run quietly, with no reason on record.

Step 2. Add the Terminate action

  1. Open https://make.powerautomate.com and select My flows.
  2. Open your flow and select Edit.
  3. In the branch where the flow should stop, select the plus sign to add an action.
  4. Search for Terminate and select it. It sits with the control actions. Exact names may differ.
  5. Choose the status: Succeeded, Failed or Cancelled.
  6. If you choose Failed, fill in the code and the message fields. The Logic Apps page says the error properties "apply only when the "runStatus" property is set to "Failed" status."
  7. Save the flow and run a test.

Microsoft's error-handling page says: "To help you determine why the flow failed, provide a status and message in the settings of the Terminate action."

Step 3. Write a message a stranger can read

A message like "Failed" tells nobody anything. Write what stopped and what to do. Our advice, not a Microsoft rule:

Step 4. Use Terminate after error handling

Microsoft's page on robust error handling describes a try and catch pattern. It says: "Place your main actions in a "Try" scope and create a "Catch" scope for error handling. Configure the "Catch" scope to run if the "Try" scope fails." The scopes page adds: "When a scope fails, it reports a single Failed status for the entire scope."

Our advice, not a Microsoft rule: put a Terminate set to Failed as the last action in the Catch scope, after you log the error and send the alert. Then test it with a bad input and read the run history. Confirm the run shows the status you chose.

For the scope setup itself, the Microsoft page "Use scopes to organize actions in cloud flows" is the place to start.

Where Terminate cannot go

The Logic Apps page says the action "can't appear inside Foreach and Until loops, including sequential loops." Check your own flow. If Power Automate refuses to save a Terminate inside a loop, move the check outside the loop or set a flag, then end the flow after the loop. Our advice, not a Microsoft rule: test this in your own flow.

Also: the Logic Apps page says Terminate "doesn't affect already completed actions." Anything the flow did before the stop stays done. An email already sent is not unsent. Put your checks before the actions that change things.

What to avoid

Signs you need this

Honest limits

Terminate does not fix the cause. It only records the stop. It also does not send a message by itself. If someone must know, add an email or Teams message before the Terminate. For the email side, see "Late tasks nobody notices: setting up late alerts". If a flow keeps starting itself, Terminate in a guard branch is one fix, and "Power Automate flow keeps running itself over and over" covers it. If a flow fails with no dependent actions, see "Error: "An action failed. No dependent actions succeeded."".

When to get help

You can build all of this yourself in Microsoft 365. If you would rather have it built and tested for your team, I do that. A tracker like this is a fixed price: $5,000 for one, built in 2 weeks. See "What a SharePoint tracker costs to build". Bring one example of the problem to a free call.

Tell me what's still manual

I am Al Davies. I run 250 High Street LLC and build SharePoint trackers and Power Automate flows for operations teams. I work remotely. The first call is free, and I will not try to sell you anything.

See trackers I built: Tools I built

FAQ

What is the difference between Terminate and just ending a branch?

An empty branch ends quietly with no reason on record. Terminate lets you set a status, and for Failed a code and message. Our advice, not a Microsoft rule: use Terminate when the run history should explain the stop.

Which status should I pick for an early stop that is normal?

Our advice, not a Microsoft rule: Succeeded, because the flow did what it was meant to do. Use Cancelled when you stopped on purpose and want the run to stand out as neither a success nor an error.

Can I put Terminate inside a loop?

The Azure Logic Apps page says the action "can't appear inside Foreach and Until loops, including sequential loops." Check your own flow in Power Automate and test it.

Does Terminate undo what the flow already did?

No. The Logic Apps page says the action "doesn't affect already completed actions."

Where do I see the status after a run?

Open https://make.powerautomate.com, select My flows, open the flow and look at the 28-day run history. Microsoft's troubleshooting page says to look at the Start, Duration and Status columns.

Sources