Terminate Action in Power Automate/Flows

Hello Everyone,
In this blog, I am going to share how we can use terminate action effectively in powerautomate . There are many situations/conditions where we can use terminate action basis on designing of the flow/powerautomate.
So in one of my client’s requirements, I was using powerautomate/flow for API integration using HTTP action where I used terminate action.
I will try to demonstrate the same below.


In the above powerautomate I am calling a third party API when a record is created in Dynamics CRM. In this scenario, everything was looking fine but the problem was when the API didn’t respond with success the system admin was unable to track which flow trigger has failed as all the flow logs showed a successful message.
As a false response from API will be considered a successful flow trigger it becomes hard for flow admin to identify the failed flow and re-run it.
As seen in the below screenshot the logs show successful runs. In this case, if a flow needs to be re-triggered the admin has to manually check the time of trigger in CRM and match the same in flow logs.

Hence to overcome this problem where re-run of flow was manual by system admin( as per my client’s requirement), I have implemented terminate action in the flows.

In the above screenshot, I have added condition checking the desired success code from service and basis on that deciding whether the flow/powerautomate is getting failed or successful.For example, if the status returned from API is 400 the flow will go into No condition and terminate the flow. This will help the admin to determine between successful API operation and failed API operation. This flow can be redesigned basis on your client’s requirements as the success of API in my case was status code.

As seen in the below screenshot logs page looks easy to determine successful and failed API calls based on customer requirements.

Hope this helps & Thank You for reading.
You can follow me on Linkedin.

Published by Rehan Khan

Dynamics 365 Developer

One thought on “Terminate Action in Power Automate/Flows

Leave a comment

Design a site like this with WordPress.com
Get started