top of page
Writer's pictureYash Agarwal

Handling default retries on Flows triggered from Power Apps

In this #PowerShot, I will show you how to stop a flow triggered from a power apps control from continuously triggering (the default retry logic that triggers the flow 4 times) when there is an error on an action.


Let's Get Started!


A flow can be triggered from a Power Apps control to perform further actions and return a response to the app. Certain actions in the flow can error out (or time-out) and this causes the flow to re-run based on the default retry policy. The flow will try to run 4 times to check if the action is successful. And these additional runs might affect duplication on prior actions.


Power Apps


Button Control: To trigger the flow and save the response in a variable.

Default Flow


Step 1: Trigger: From Power Apps


Step 2: Action: Get Item from SharePoint. Here, I have hard-coded a number value in the ID of the item. This action is bound to fail as an item with that ID does not exist on the list.


Step 3: Respond to a Power App or Flow.

Error


Default retry policy triggers the flow 4 times. This might impact cases where items/records or child flows/other processes are called before the failed action on account of multiple triggers. Note that this issue arises only when the flow ends with the action to return a response to the app.

Updated Flow


Add a variable action and update it after the action that is scoped for an error and set the run after as shown in the image below:

Note: For multiple actions where there is uncertainty on which one might fail, you can use a scope control and pull in all the actions and implement a similar functionality.


Successful Run

 

In this post, we saw how to handle the default retry on Flows in Power Automate triggered from a Power Apps control. Similarly, relevant keys can be sent from the flow based on the actions to notify the user or set flags in the Power App.


I hope you found this interesting and it helped you. Thanks for reading!

Recent Posts

See All

Comments


bottom of page