Power Apps Tutorial: How to get list of Power Automate Flows.

Hello Guys,

In our previous blog, we discussed about polymorphic lookups. Today, we will see how to get list of PA flows.



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

There are many situations where administrators and developers need to retrieve a list of Power Automate flows running in a Power Platform environment. As the number of flows grows over time, it becomes difficult to track which flows are actively used, who owns them, and how they impact overall system performance and scalability.

Having visibility into all flows within an environment is essential for governance, performance monitoring, troubleshooting, licensing optimization, and security compliance. In this blog, we will explore different ways to get a list of Power Automate flows in the Power Platform and understand when and why each approach should be used.

In large organizations, it is common to have hundreds or even thousands of Power Automate flows created by different users and teams. Over time, some flows become unused, misconfigured, or poorly designed, leading to performance issues, unnecessary API calls, and increased licensing costs. Without proper visibility, maintaining and governing these flows becomes a significant challenge for Power Platform administrators.

We can use below methods to retrieve PA flows:

  • Power Platform Admin Center
  • PowerShell (Microsoft.PowerApps.Administration.PowerShell)
  • Power Platform CLI (PAC)
  • Dataverse tables (Flow metadata)

Let's see how to retrieve PA flow list using Dataverse tables.

To retrieve the list of Power Automate flows stored in Dataverse, we will use XRM Toolbox, which is a commonly used tool for administration and analysis in Dataverse environments.

Step 1: Connect to the Environment

  • Launch XRM Toolbox
  • Click Connect
  • Select or create a connection to the required Power Platform environment

Once connected successfully, proceed to the tool library



Step 2: Install SQL4CDS Tool

  • Open Tool Library in XRM Toolbox
  • Search for SQL4CDS
  • Download and install the tool

After installation, open SQL4CDS



Step 3: Open Query Editor

  • Once SQL4CDS is opened:
  • Select the connected Dataverse environment
  • Open the Query Editor

Paste the SQL query provided below



Power Automate flows are stored in the workflow table in Dataverse. The following query retrieves a list of cloud flows along with basic details.

SELECT

    name AS FlowName,

    createdon AS CreatedOn,

    modifiedon AS ModifiedOn,

    statecode AS StateCode,

    statuscode AS StatusCode,

    owneridname AS Owner,

    category,

    mode

FROM workflow

WHERE category = 5

ORDER BY modifiedon DESC


category = 5 is used to filter Power Automate cloud flows

You can add or remove columns as per your reporting or governance requirements.

Hope it helps...




Comments

Popular posts from this blog

Creating Custom API in D365.

JavaScript in Power Platform – Frequently Asked Interview Questions.

Read Only Sub Grid & Editable Sub grid in Dynamics 365