Top
Photo by Scott Graham on Unsplash

Get Power Automate Desktop runs details


This post is totally focused on description of the Dataverse structure that is used to store details about runs of all Power Automate Desktop ui flows. Or as called today: desktop flows and cloud flows built using Power Automate platform.

The described below functionalities regarding visualizing data from flows’ runs, presenting statistics and in-depth insights is a highly demanded data requested by the business and IT. The departments require RPA designers to deliver these information, so that they know what bots are actually doing, why they are failing, where are bottlenecks, where they run etc. It’s worth to spend some time to build your tailored dashboards.

Dataverse structure

The below structure is used actually to store information about all kinds of flows user is able to build using Power Automate: cloud flows, business flows and desktop flows:

Dataverse structure/ tables to store data about flows' runs

In fact, there are only two real tables above. The third, additionalcontext is table build dynamically using contents of file attached to every record in table flowsessions. Let me explain this to you.

  1. workflows (display name: Process) – table is keeping all the information about all flows built in Power Automate, in a specific environment. To filter desktop flows from all other kinds of flows, you need to use column category and get all rows with value equal 6. Then to filter further use column uiflowtype and get all rows with value greater or equal 0:
    1. 0 are legacy desktop UI flows (including WinAutomation flows triggered via UI flows),
    2. 1 are legacy Selenium IDE based web UI flows,
    3. 2 are called PowerShell, however these are new Power Automate Desktop.
  2. flowsessions (display name: Flow Session) – table is keeping details about each flow’s instance. One of the very important columns that table has is “additionalcontext”, which contains…
  3. additionalcontext (not a Dataverse table, but file attached to each flowsession entry) – this is a file, containing base64 encoded JSON object. The object stores all information of that specific run, including details about each action’s execution. Using this information you can get crucial insights how the instance ran, which action failed, what was the failure reason, what were the inputs and outputs for each action etc…

How to access the data?

There are two ways to get Power Automate Desktop runs details. It is either by querying Dataverse tables directly or by using odata endpoints.

Note! To get environment URL log in to https://admin.powerplatform.microsoft.com, open specific the one you want to access and copy value under “Environment URL”.

The odata endpoints URLs are below:

  • https://{ENVIRONMENT-URL}/api/data/v9.1/workflows?$filter=category eq 6
  • https://{ENVIRONMENT-URL}/api/data/v9.1/flowsessions
  • https://{ENVIRONMENT-URL}//api/data/v9.1/flowsessions({flowsessionid})/additionalcontext

Access the data in Power Automate

The only difficulty to access this data in Power Automate is in getting contents of the additionalcontext file. Using build-in Dataverse actions, accessing contents of files is possible only using the “Get file or image” action (that works only for current environment and is available only for flows created in solutions): Common Data Service (current environment) – Connectors | Microsoft Docs.

If you’d like to access it from a different environment then you need to use “Invoke HTTP with Azure AD” action. Configure the access by providing environment URL:

Then simply use odata endpoint and voilla! 🙂

Next steps

Important! Unfortunately due to impossibility of getting Dataverse file contents using environment URL as a dynamic variable (the Dataverse action works only for current environment, whereas HTTP with Azure requires to define the URL in advance, same issue in Power Bi) you need to hardcode each environment you’d like to monitor.

After all this introduction I now encourage you to use Power Bi to visualize the data from UI flows’ runs. However to gather data from multiple environments, you will need to create connections to each of them separately.

The draft report I am using gives me information about all details of a specific UI flow instance:

The next page of the report delivers me an overview information about stats (actions, errors), together with some calculations around actions’ time executions etc.:

Power Bi gives you of course unlimited possibilities, so the way you will use this data is only limited by your creativity.

Note! A lot from the above functionalities are available in the Center of Excellence Starter Kit dashboard. Simply download it and install in your Power Platform environment. Get it here: https://aka.ms/coestarterkit.

I hope that after the lecture of this post you will know now how to start your adventure with flows’ data and build your own dashboards. If you have any questions, leave them in the comments below.


Tomasz Poszytek

Hi, I am Tomasz. I am expert in the field of process automation and business solutions' building using Power Platform. I am Microsoft MVP and Nintex vTE.

2 Comments
  • Sravan

    Hi Tomasz,
    Thank you for detailed explanation
    I am accessing dataverse tables .. but I don’t see flowsessions table in it.
    Could you please help me .

    August 20, 2021 at 11:32 am Reply
    • Tomasz Poszytek

      Be sure you switch view to display all tables. It’s display name is “Flow Session”.

      August 30, 2021 at 10:33 am Reply

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.