4

We're looking for a way to identify any Flows that are connected to specific SharePoint Online lists. We do have access to Flow Admin Center, but there doesn't seem to be a way to filter the Flows to ones connected with a specific list.

1

There is a way to access details about flows attached to the list using the CSOM. Here is a sample code that can be used for that:

//You need to connect to the site using CSOM, and then you can use this code to get the flows details
//...    
List list = context.Web.GetList("Lists/YourList");
var flows = list.SyncFlowInstances();
context.Load(flows);
context.ExecuteQuery();

flows.SynchronizationData contains the JSON string with all the details about flows. You can either get the details about flows manualy from the flows.SynchronizationData string or by deserializing it and looping through all the flows. One way to access it would be by using System.Web.Helpers assembly, like this:

using System.Web.Helpers;

//...

List list = context.Web.GetList("Lists/YourList");
var flows = list.SyncFlowInstances();
context.Load(flows);
context.ExecuteQuery();

dynamic data = Json.Decode(flows.SynchronizationData);
for(var i = 0; i < data.value.Length; i++)
{
    Console.WriteLine(data.value[i].properties.displayName);
}  
  • 1
    This was an excellent approach, thanks. System.Web.Helpers was not available in .NET 4.7, but adding microsoft-web-helpers from Nuget resolved that. – Alex Combs Nov 11 at 19:01
0

Very interesting question - to achieve this you can write a MS Flow with the action "List Flows as Admin" this will return you all Flow from your environment, then at the end of this we can export the results to csv or we can add the result to SharePoint custom list, from their we can filter by list name.... and also you may seek for similar kind of "List Flows as Admin" action which will get the flow by list.... though I have not checked this :-) may be something ready-made could be available.

Reference URL : https://powerusers.microsoft.com/t5/Building-Flows/How-to-get-a-list-of-all-flows-in-environment/td-p/292002

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.