How do we resubmit multiple instances of failed flows in Power Automate

Power Automate Resubmit All Failed Runs: 3 Ways

No comments

Loading

In this “Power Automate Resubmit All Failed Runs” article, we will learn how to resubmit all flow runs in Power Automate; the flow could be in a failed, cancelled, or running state.

Power Automate, formerly known as Microsoft Flow, is a powerful tool for automating workflows and processes, helping organizations save time, reduce errors, and improve overall efficiency. Sometimes, however, there might be instances where a flow encounters an issue or fails to execute successfully. In such cases, the Power Automate Resubmit Flow feature comes to the rescue. In this article, we will dive into the concept of resubmitting flows within Power Automate and explore how it can help streamline workflow efficiency.

Power Automate Resubmit Flow: Understanding Flow Resubmission

Power Automate allows users to create automated workflows by connecting various applications and services. These workflows are designed to execute a sequence of actions when a trigger event occurs. While Power Automate is known for its reliability, there can be occasional hiccups that cause a flow to fail. These failures might occur due to changes in connected applications, temporary network issues, or other unexpected circumstances.

Flow Resubmission is a feature that enables users to reprocess or retry a failed flow without the need for manual intervention. It provides a convenient way to handle exceptions and maintain the flow of automated processes.

Benefits of Flow Resubmission

Increased Reliability: Flow resubmission enhances the reliability of automated workflows. When a flow fails, it can automatically attempt to rerun, reducing the chances of missing critical tasks or data.

  • Time Savings: Manual intervention to address failed flows can be time-consuming and inefficient. Resubmitting flows automatically minimizes downtime and allows processes to continue without delay.
  • Error Handling: Resubmission includes error handling capabilities. This means that you can configure how many times a flow should retry, the time intervals between retries, and even customize actions to be taken after multiple failed attempts.
  • Data Integrity: Ensuring data consistency and accuracy is crucial. With flow resubmission, you can safeguard data integrity by automatically reprocessing any failed data or tasks.

How to Resubmit a Flow in Power Automate?

Resubmitting a flow in Power Automate is a straightforward process. Here are the general steps to follow:

  • Identify the Failed Flow: The first step is to identify the flow that has failed. This can be done by checking the flow history and locating the specific instance of failure.
  • Access Flow History: In Power Automate, open the flow for which you want to resubmit. Navigate to the “Run history” section, which provides a detailed log of each flow run.
  • Select the Failed Run: Find the run that failed and click on it. This will give you more information about why the flow failed and provide options for resubmission.
  • Resubmit the Flow: Within the detailed view of the failed run, you will typically find an option to “Resubmit.” Clicking this option will initiate the resubmission process.
  • Configure Resubmission Settings: Depending on your needs, you can configure settings for flow resubmission. This includes defining the number of retry attempts, the time intervals between retries, and actions to be taken if all retries fail.
  • Monitor Progress: After initiating the resubmission, you can monitor the progress in the flow’s run history. It will show the status of each resubmission attempt.

Power Automate Resubmit Flow: Demo

In the below section, I will show how many ways we can resubmit flow runs in Power Automate.

Resubmit Flow in Power Automate – manually

Go to your “My Flows” gallery.

Select the flow that you want to resubmit for the flow run.

Filter your flow runs from the top-most corner flow run status dropdown; select failed runs. You can filter all statuses here, like failed, cancelled, running, etc. Refer to the below image for the Power Flow Run status:

Power Automate Flow Run Status: 

Power Automate Flow Run Status
Power Automate Flow Run Status

Select the runs for which you want to resubmit. Please be aware that we cannot submit more than 20 flows for a resubmit flow run or cancellation. This tool will allow you to select but cannot submit more than 20 flows at a time. This is a limitation in the manual process, so we can overcome this limitation using the “Power Automate Resubmit All Failed Runs” automated flow.

Resubmit Flow in Power Automate manually
Resubmit Flow in Power Automate manually

Resubmit Flow in Power Automate – Automatically Resubmit Single Flow

Add the Power Automate Management action “Resubmit Flow”.

Resubmit Flow Action in Power Automate Management
Resubmit Flow Action in Power Automate Management

Configure the below parameters in the Resubmit Flow action:

  • Environment: Select your environment where you want to perform the resubmit flow action.
  • Flow: Select your flow flow if you want to perform the resubmit flow action.
  • Trigger Name: It is a dynamic value; we need to know how to get it. To simplify it, we can remember that if the flow is manually triggered, then we need to pass it as “Manual” and if the flow is cloud-type automated, which trigger starts with “When an item is created or modified“, then the trigger name will be “When_an_item_is_created_or_modified” basically it is the trigger action internal name; the syntax is trigger action display name spaces get replaced with the underscore (_).
  • Run ID: This is your flow run ID for which you want to perform a resubmit action. Get the flow run ID from here.

Power Automate Resubmit All Failed Runs – Automatically Resubmit Multiple Flows more than 20

In the above Power Automate Management action “Resubmit Flow”, we have learned how to resubmit a single Power Automate Flow using the Power Automate; in this demo, we will learn how to resubmit all failed flows from an environment dynamically using the Power Automate Flow. It is the same process as the way we have learned how to get all running flows and how to cancel all running flows dynamically using the Power Automate flow.

Here only the difference is that we need to get all failed flows or cancelled flows instead of running flow, then in each loop, we need to add the Power Automate Management action “Resubmit Flow“, then configure the environment, flow, trigger name, and run ID dynamically.

Before getting into the demo flow, let’s learn about how to filter flow run status based on the running, failed, and cancelled statuses.

API to get all flows where the flow status is running:

https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['properties/environment/name']}/flows/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['name']}/runs?api-version=2016-11-01&$filter=Status%20eq%20%27running%27

API to get all flows where the flow status is cancelled:

https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['properties/environment/name']}/flows/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['name']}/runs?api-version=2016-11-01&$filter=Status%20eq%20%27cancelled%27

API to get all flows where the flow status is failed:

https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['properties/environment/name']}/flows/@{items('Apply_to_each_|_Loop_through_all_the_flows')?['name']}/runs?api-version=2016-11-01&$filter=Status%20eq%20%27failed%27

Let’s have a look at the below API to get all flows where the flow status is failed:

API to get all flows where the flow status is failed
API to get all flows where the flow status is failed

Note:

  • In the above GET REST API, all queries are the same, only the status parameter value is different, like $filter=Status%20eq%20%27failed%27. Here, you need to update this highlighted text based on your requirements, like “running“, “cancelled,” “failed,” etc.
  • You need to copy the output of this GET all failed flow running API (shown below), where ID, status, and trigger name properties are very important; we need these in the “Resubmit Flow” action configuration.
Get All Failed Flows in Environment using Power Automate - Output
Get All Failed Flows in Environment using Power Automate – Output

Here I am not explaining each step as the same process as canceling all flows in Power Automate; here I am just highlighting the steps where you need to apply the changes to resubmit flow to work dynamically for more than 20 flow instances or all failed run instances.

Using the above API, we got all flow failed flow runs from the given environment.

Then, inside the for each loop of all failed flow runs, I have added one “if” condition, which is optional. The reason for this “if” is that instead of resubmitting all failed flows from the given environment, I have targeted only the flow where I am resubmitting all instances of this particular flow so that it won’t resubmit flow for all the flows in your environment. Then, in the “If yes” section, I have added a “Power Automate Resubmit Flow” action and passed the parameters dynamically, as in the previous article, which cancelled all flow runs.

 

 

Power Automate Resubmit All Failed Runs
Power Automate Resubmit All Failed Runs

Power Automate Resubmit All Failed Runs – Complete Flow screenshot

Here is the completed screenshot of the Power Automate Resubmit All Failed Runs Flow:

Power Automate Resubmit All Failed Runs Flow - Part 1

Power Automate Resubmit All Failed Runs Flow - Part 2

Power Automate Resubmit All Failed Runs Flow - Part 3

Power Automate Resubmit All Failed Runs Flow - Part 4

Power Automate Resubmit All Failed Runs Flow - Part 5

Power Automate Resubmit All Failed Runs Flow - Part 6

Power Automate Resubmit All Failed Runs Flow - Part 7

Power Automate Resubmit All Failed Runs Flow - Part 8

Power Automate Resubmit All Failed Runs Flow - Part 9

Power Automate Resubmit All Failed Runs Flow - 10
Power Automate Resubmit All Failed Runs Flow – Complete Flow screenshot

Summary: Power Automate Resubmit Flow

Thus, in this “Power Automate Resubmit Flow” article, we have learned about how to resubmit multiple flows or single flows in Power Automate using the Power Automate flow dynamically. In this article, we have also learned how to work with Power Automate string functions like indexOf()lastIndexOf()nthIndexOf()substring(), sub(), add(), etc.

Power Automate Resubmit Flow is a valuable feature that helps ensure the reliability and continuity of automated workflows. It not only saves time but also provides a robust mechanism for handling errors and exceptions. By configuring resubmission settings intelligently, you can customize the behavior of your flows to meet specific business requirements.

As organizations continue to rely on automation to enhance productivity and reduce manual tasks, having the ability to resubmit flows in Power Automate becomes increasingly important. With this feature, businesses can maintain operational efficiency and data integrity even in the face of unexpected hiccups and issues.

See Also: Power Platform Articles

You may also visit the Power Platform article hub, where you will see a bunch of articles focusing on Power Platform, like Power Automate, Power Apps, etc. All the articles are written with real-time project scenarios and troubleshooting techniques. For the Power Automate function references, you may refer to this Microsoft Power Automate Function references  article.

 

If you found this article helpful and enjoyed it, please consider sharing it with your friends and colleagues. Please don’t forget to subscribe to our site to receive our latest articles directly in your inbox. 🙂

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment