TLDR; Here's the unmanaged solution to sweep your environments in search for flows triggered by an HTTP callback
ListflowswithHTTPcallback - Version: 1.0.0.2
If you ever found yourself debugging a third-party Flow with poor documentation, and this Flow calls another one using an HTTP request and you don't have a clue where this child Flow is *hidden*, you understand the reason behind this post. The situation is even worse when working with multiple environments with Flows spread among My Flows, Shared Flows and Solutions.
In this post, I will demonstrate how I saved several hours of Flow-hunting and headaches creating an auto-generated detailed catalogue of all the Flows in your organization that use HTTP triggers.
- Create a new manually triggered Flow with the first step using the connector List Environments as Admin (Power Platform for Admin). We are gonna get the HTTP-triggered flows from all environments.
- Create an empty variable of type Array and an Apply to Each right after to loop through all the returned environments:
- Let's get the Flows from every environment. Create a new step using List Flows as Admin V2 (Power Automate Management):
- Add dynamic content in the Environment field referencing the name property from the loop item:
- Now let's make sure we keep only the HTTP-triggered flows. Add a Filter array step:
- Now add a conditional step to check if that are any flows left after the filter:
- Inside the If yes block, let's gather some info to make the final result more useful and user-friendly. First, we get the environment display name:
- Then we create the new object with a Compose operation:
- The next step is to compose a new object merging the current array of the loop with the existing ones inside our variable:
- And then store it back into the variable:
Ok, until this point we have the collection of Flows that are triggered by an HTTP request, but we don't have the actual URL that triggers the Flow. So let's get this information.
I will separate the next steps into two branches: The following one is essential for our results, but the other one contains only the Creator's information, so I will flag that part as optional. So let's create a Parallel branch to approach both parts:
- Branch #1 – Getting the HTTP trigger URL
- Create another Apply to each loop that will fetch the trigger of each Flow in our list. Inside this loop, add a step with List Callback URL (Power Automate Management) followed by a Compose action. This will get the data and in sequence add it to the object as a new property called 'trigger':
[Important] I had cases where I had access to some environments but with limited permission, which resulted in the failure of the List Callback URL step. To prevent our Flow from crashing, the next step will have a custom Configure run after including 'has failed' cases. This step will remove empty triggers (just in case):
At this point we already accomplished our main goal here: collect all the flows and their HTTP trigger URL. The output of our last action is the following, containing:
Legend
id: unique ID of the flow
uri: partial URL to access the flow
displayName: title of the flow
state: current state of the flow
environment:
– id: unique ID of the environment
– displayName: friendly name of the environment
creator: unique ID of the author
trigger: the HTTP URL to trigger the flow
As you can notice, the creator's info is not that straightforward since we just have their unique ID. If that's enough, you can stop right there. But why not make it better? The following steps will describe how to fetch this information and add it to the final object. Let's do it!
- Branch #2 (Extra) – Getting the author's information
- In the other branch, let's first get all the creators with a Select step, and then we execute a Union inside a Compose action to remove duplications:
- Now we apply another loop to get their names (and any other info you may want) using the connector Get User profile V2 (Office 365 Users), and collecting the result inside a Compose step in the sequence:
- And then, outside of the loop, we collect the data using another Compose action:
Now that we have the users' (creator's) data, we have to add their info in the Flow objects as a new property. There are a few ways to achieve that, but since the other branch is going to take a few minutes to complete, there's no reason to complicate things here. So let's use another Apply to each loop (note that this action runs after the completion of both branches).
- Inside this loop, we add a Filter array to select the right user and then we add the info to the object with a Compose action:
- And finally, let's collect everything in a single object:
Voilà! After running our Flow, this is the final output:
Legend
id: unique ID of the flow
uri: partial URL to access the flow
displayName: title of the flow
state: current state of the flow
environment:
– id: unique ID of the environment
– displayName: friendly name of the environment
trigger: the HTTP URL to trigger the flow
creator:
– id: unique ID of the author
– name: author's display name
– email: email of the author
You can keep this result in a document, export it to CSV, or whatever way you prefer. You can also enhance this flow to search for a specific HTTP trigger instead of collecting all of them. It's all on you now.
Don't stop learning!
Thanks for detailing this subject. Do you have plans to write more?
Thanks for reading, Percy. I do have plans to write more and I have a list of subjects. Stay tunned!