For several of my customers I need to monitor if flows fail or are being set to the disabled state. For example if a solution import of flows fails. Till now this is not default functionality in Microsoft Automate, so has to be custom developed. I use a flow for this, the periodacaly checks if one of the flows is being disabled, or if any failed runs arises.
I use the “List flows as admin” action to find all custom flows (including flows within solutions). This action lists all flows, together with the state of each flow. Unfortunately, there is no listing of runs within this connector. So we have to make our own connector to list the runs within a flow. All steps for creating this flow are:
- Create App registration in Azure to access the Automate Management endpoint
- Create Custom Connector to list runs, using the app registration for authorization
- Create the Check Status en failed runs flow
Some resources where steps are described in more detail:
Create App Registration
When creating an app registration, the following steps are important:
- Redirect URL: “https://global.consent.azure-apim.net/redirect”
- Create permissions for access to read flows:
Create custom connector
In the custom connector there will be the call to the endpoint checking the flow runs. This call is:
If you see any improvements, pleasae let me know: email@example.com.
Wish you all the luck with this flow!