CRM Crate

What is Retry Policy in Power Automate [Step By Step Guide]?

We will learn and understand Retry Policy in Power Automate flow. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.

What is Retry Policy in Power Automate [Step By Step Guide]?

Why is Retry Policy in Microsoft flow?

A Retry Policy defines how an action or trigger retries a request when the original request times out or fails. The retry policy works with the HTTP action and handles the following HTTP status codes.

Sr NoError CodeError Meaning
1408Request Timeout
2429Too many requests
35xx  xx refers to any number like 500 – Internal server error, 503 – Service Unavailable, 522 – Connection timed out etc

Accessing a Retry Policy in the HTTP action

Open the Power Automate flow which the HTTP action is used and click on more option (Three Dots) >> Settings as shown below.

Here, navigate to “Retry Policy” for as shown below. By default, the HTTP Action supports retry of upto 4 times at exponentially increasing intervals if there is a request failure.

Setting up a Retry Policy in Microsoft Flow

We can setup our own custom retry policy when the default retry policy does not satisfies the operational needs. Microsoft provides two custom retry policies namely “Exponential Interval” & “Fixed Interval” as shown below.

For demonstration purpose, we will setup a Fixed Interval based retry policy in our Power Automate.

Steps to setup a Fixed Interval retry policy –

Step 1- Define a total retry count in the policy. You can specify a retry count from 1 to 90.

Step 2- Define a interval at which an operation retry. You need to specify interval in ISO 8601 format.

ISO 8601 Durations are expressed using the following format, where (n) is replaced by the value for each of the date and time elements that follow the (n) as shown below.

P(n)Y(n)M(n)DT(n)H(n)M(n)S

P is the duration designator (referred to as “period”), and is always placed at the beginning of the duration.
Y is the year designator that follows the value for the number of years.
M is the month designator that follows the value for the number of months.
W is the week designator that follows the value for the number of weeks.
D is the day designator that follows the value for the number of days.
T is the time designator that precedes the time components.
H is the hour designator that follows the value for the number of hours.
M is the minute designator that follows the value for the number of minutes.
S is the second designator that follows the value for the number of seconds.

For example – The “P3Y6M4DT12H30M5S” represents a duration of three years, six months, four days, twelve hours, thirty minutes, and five seconds.

In our case, we will setup a 5 seconds interval as shown below.

Test & validate the newly created custom Retry Policy

In our demonstration, we have created a manual triggered based Power Automate flow which calls an Azure Function using the HTTP action. We will purposefully return a faulty HTTP response (500 Error Code)from our Azure Function in order to validate the implementation as shown below.

Thus, we learned the concept of Retry Policy in Power Automate.

5 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
error: CRM Crate Security Engine - Disabled Right Click & Selection!

Congratulations!

Well Done,
Welcome to CRM Crate

Stay tuned with us and get all latest updates and learning in Microsoft CRM and related techonologes.