How to get a link to Power Automate flow running on a specific SP item
Posted On August 18, 2021
“Can I link SharePoint item directly to a specific flow run to easily find the right Power Automate flow instance? It takes so long to find the right flow in the run history.”
If you run a flow very often, e.g. for each update of each SharePoint item, you’ll have a lots of runs. And lots of runs mean a lots of entries in the flow run history. And the more entries you have, the harder it gets to find the right one.
When you search for a flow that did run on a specific item, you might end up checking 10+ flow runs until you find the right one. It’s bit of a step back from the old SharePoint workflows where you could add the link to the flow with a single checkbox. If you want such a link to Power Automate flow, you must add it by yourself.
Build the link to the flow
Opening any existing flow run history in a browser, you’ll see that it has always the same format. There’s the environment id, flow id and flow run id, and then the rest of the url. Therefore, if you knew the 3 ids, you could build the link to the flow run manually.
Power Automate has an expression workflow() that will give you all the information about the running flow. Among the information are the 3 id’s required to build the url. All you need to do is to build the whole url string by combining the fixed parts and the workflow() parts.
It’s easy to get lost in the flow run history if your flows run very often. Power Automate by itself doesn’t offer any connection, any link between a SharePoint item and a flow run. Therefore, if you want a direct link in the item properties, you must build and update it by yourself.