Developer Note: Retrieving Information About the Flows in an Org or About a Single Flow

While coding in Apex, you can use SOQL to retrieve information about the Flows in an organization. We touched on this while describing the Flow Picker, but never really focused on it.

You can conduct SOQL on the FlowDefinitionView to get the data for a list view of flows. Once you have a particular flow in mind, use FlowVersionView and FlowVariableView to get its variables.

Here’s how Flow Picker does it: