cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bdomzalski
Frequent Visitor

Retriving flow run information for failure monitoring

Hi,

I had an idea of building generic flow for alerting failed flow-runs.

I identified that the definition of a flow is kept in CDS as a "Process" entity (name: workflow) but I was unable to find out where information about flow execution is stored.

Is it possible to get failed flow-runs with the date and flow name in Power Automate?

1 ACCEPTED SOLUTION

Accepted Solutions

I know about the weekly emails but wanted to do something more proactive and with shorter response time 🙂

I found an endpoint to retrieve flow-runs. The Get-FlowRun cmdlet from PowerApps.PowerShell package uses it and we can call it using Invoke an HTTP request from HTTP with Azure AD connector.

The biggest problem I had were with the connection - it should be configured as follows:

Base Resource URL
https://api.flow.microsoft.com/
Azure AD Resource URI (Application ID URI)
https://service.flow.microsoft.com/

 

The endpoint url:

https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/@{triggerBody()['environmentId']}/flows/@{triggerBody()['flowId']}/runs?api-version=2020-05-20

 

Spoiler
Request action for flow-runsRequest action for flow-runs
Flow API connection configurationFlow API connection configuration 

 

 

View solution in original post

6 REPLIES 6
v-bacao-msft
Community Support
Community Support

 

Hi @bdomzalski ,

 

There doesn't seem to be any properties in this entity so that we can distinguish whether Flow fails and obtain the time of failure.

As far as I know, we will receive a notification every week that Flow fails or cancels. It will display the name of the flow and the number of failures, we can directly click the link to access the corresponding Flow.

Image reference:

Spoiler
155.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I know about the weekly emails but wanted to do something more proactive and with shorter response time 🙂

I found an endpoint to retrieve flow-runs. The Get-FlowRun cmdlet from PowerApps.PowerShell package uses it and we can call it using Invoke an HTTP request from HTTP with Azure AD connector.

The biggest problem I had were with the connection - it should be configured as follows:

Base Resource URL
https://api.flow.microsoft.com/
Azure AD Resource URI (Application ID URI)
https://service.flow.microsoft.com/

 

The endpoint url:

https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/@{triggerBody()['environmentId']}/flows/@{triggerBody()['flowId']}/runs?api-version=2020-05-20

 

Spoiler
Request action for flow-runsRequest action for flow-runs
Flow API connection configurationFlow API connection configuration 

 

 

View solution in original post

 

Hi @bdomzalski ,

 

It seems that the existing connectors cannot meet this requirement at present. I am afraid I am not very good at using HTTP with Azure AD. Please consider contacting Microsoft Support for better assistance.

176.PNG

In addition, there is a thread mentioned that we can use Flow studio to monitor the status of Flow, please check if it helps:

https://powerusers.microsoft.com/t5/General-Power-Automate/Monitoring-Flows/m-p/271867

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LinnZawWin
Kudo Kingpin
Kudo Kingpin

@bdomzalski 

I have posted a blog post that may be of interest to you.

Get Flow Run by Using Dynamics 365/CDS Record ID as Parameter in Power Automate 

@bdomzalski thanks for the great preparation of the solution. Very helpful!

PS: The list of flow runs somehow is limited to 50?!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,514)