To get all your broken connections in the Power Platform can be a challenge. In this post I will use flow to collect the broken connections.
Options to get broken links
In this post I will have a look at using a flow to collect the broken connections after someone contacted me today about the PowerShell solution that I wrote a while back.
At first I started building my flow and then I quite quickly ended up with the hated nested apply to each steps.
The right way to collect broken connections
The better way is to create a flow that doesn’t use any nested apply to each steps like the one below:
Ok, you might want to schedule these flows on a daily basis or so and then send an email at the end, but that is a bit of detail that we can worry about later. In this post I want to focus on getting the failing connections only.
We all use multiple environments, don’t we? so I want to step through the different environments first. so after my initial trigger of the flow I will add a Get Environments action.
No need to bother with an apply to each here. Power Automate will add it automatically as we complete the configuration of the Get Connections action.
So just add the get connections and select name form the dynamic properties as shown below.
Massage the connections data
The next action is a select.
I’m going to use the following expressions in the above select.
Now we just need to filter the connected connections out and we have all the connections that are in trouble.
now all we need to do is collect the results from the filters and we will have a single array with all the failed connections from all environments.
14 thoughts on “Get all your broken connections using Power Automate”
[…] To get all your broken connections in the Power Platform can be a challenge. In this post I will use flow to collect the broken connections. Options to get broken … Read More […]
Thanks, Pieter! Very interesting! Once we have the information, how do we find/navigate to the connection in question to fix it (if it’s our own)? The connection name seems to be a GUID. Is there a URL we can construct with that that will take us to the connection?
The display name might help a bit. Also there is more info returned by the get connection action. I could probably build up the url to the connection page.
Very useful, as always.
Would you be So kind to update the blog and provide the details that are in the first-function of the filter step???
The expression is:
Is anyone else getting a long list of “broken” connections, but on investigation finding that
a) A lot of the broken connections are from flows that were deleted long ago, and
b) Even on the flows that are not deleted, many of them seem to be working just fine and are displaying no errors?
The first point yes. That is expected. Connections are used by flows. They aren’t part of the flows.
On the second point. I would expect that running flows that don’t actively use an action that uses a disabled connection to be fine. You wouldn’t be able to edit these flows, but they might quite well be able to run as long as they don’t hit the affected actions.
I’m running it an “expression is invalid” when I enter this.
Could this because my Flow environment is running in the Dutch language?
Hi Rob, What is the expression? Can you copy paste it here from your action?
So is this to report on broken connections in your flows? I’m looking to report on broken links in a Sharepoint site. Is there a Power Automate solution to this? Or do I need to use some other application? It seems like a basic report that should be built into Sharepoint but I can’t find anything obvious. Thanks.
A while ago i created the following project. I never finished as my client didn’t need to have this completed.
Feel free to open a chat and I’m happy to discuss it further.
Just to answer this, it’s most likely because the font on the blog here is using incorrect apostrophes.
(To Pieter: I recommend using a font that will copy/paste into Flow naturally without having to paste and replace them)
Pieter, Is there a way to automatically fix the connections that are broken due to password change in the AD ?