cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucian
Advocate III
Advocate III

How to get ALL flow run history

Hello,

 

I have a specific flow that need more attention and I would like to use an automation process that will get all the flow run history.

I have found some articles that describe how to build an custom connector that could do that, for example: Custom connector to get flow run history.

The problem is that will return only the "last 50" runs and I don't find a way to use the "nextLink" or "$skiptoken" attribute from the resulting JSON that looks like this:

 

 

{
  "value": [
    {
      "name": "RunName-1",
      "id": "/providers/Microsoft.ProcessSimple/environments/...",
      "type": "Microsoft.ProcessSimple/environments/flows/runs",
      "properties": {
        "startTime": "2021-12-03T15:43:06.2437584Z",
        "endTime": "2021-12-03T16:46:17.7240414Z",
        "status": "Succeeded",
        "code": "Terminated"
      }
    },
    {
      "name": "RunName-2",
      "id": "/providers/Microsoft.ProcessSimple/environments/...",
      "type": "Microsoft.ProcessSimple/environments/flows/runs",
      "properties": {
        "startTime": "2021-12-03T14:30:40.9044521Z",
        "endTime": "2021-12-03T14:30:48.4232059Z",
        "status": "Succeeded",
        "code": "Terminated"
      }
    }
  ],
  "nextLink": "https://emea.api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/{EnvironmentName}/flows/{FlowName}/runs?api-version=2016-11-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IVFUaEVRakEtIiwibmV4dFJvd0tleSI6IjEhODQhTXpWRVJUaEJRVVV5TURjek5FRTRSRGszUWpJM05UTTNRams0UkRCRE5ERmZNRGcxT0RVMk16QTJOVFUyTVRneU5UZ3lORGN3TVRBNU16STRNRGstIn0%3d"
}

 

 

I have tried to find some inspiration in the article Microsoft Graph Delta Query from Microsoft Flow: Part 2 but I cannot find enough information how to adapt it to flows.

 

Does anybody have successfully automate the process of getting all the run history? I would like to avoid manually download the CSV file history or use an "desktop flow" to download that CSV file.

 

Kind Regards,

Lucian

4 REPLIES 4
diogoamorimdev
Frequent Visitor

Hi Lucian.

Did you find a way?

I'm trying to do this as well.

Hi @diogoamorimdev ,

 

Unfortunately I wasn't able to find a way.

Even with another example posted by @SimonSays into another similar topic (Link to Cloud Flow Run History) that it seems a great idea, except I'm lacking of some basic knowledge using HTTP request and "tokens" and did not find a way to use it.

 

As a workaround, I have put in the flow I want to monitor, the required actions to record the flow run information in my dataverse table.

 

But I'm still searching for an option to gather this information outside of the "original flow".

 

Kind Regards,

Lucian

CatSchneider
Helper I
Helper I

@Lucian, have you tried pulling the data into Power BI? I've had some success with using the nextlink/$skiptoken pieces when connecting via weblink. I can't say if it would also work in this instance, but it's something to try.

 

Bonus tip: if you're not in a GCC or higher-restricted tenant, you might be able to use the Power Automate Visual within Power BI to re-run failed flows.

Let me know if you try any of this out and have some success.

Hi @CatSchneider ,

 

No, I did not try in Power BI because I need the data in Dataverse.

Anyway, which would be the connector for Power BI to get data directly from flow runs not by using the CSV file?

 

Kind Regards,

Lucian

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,812)