How to create link to Flow instance

How to create link to Flow instance

Introduction

After I finish work with How to Apply Site template (Site Design) via Power Automate I made quick investigation. And I notice that one method which is very practical and useful is not widely shared.

The method how to create link to Flow instance:

For Admins, it is for sure awesome thing, instead of trying to find the failed run in the list they get link directly to their mailbox 😍.

Workflow function

In this paragraph I don’t want to go into details to much but Power Automate have the workflow function. The result of this function is:

Using the above information, me and everyone were able to create a link to Flow instance.

However, there is one bit which cannot be extracted from the workflow function… It is the beginning of the URL which is the environment location. In short, that region information need to be changed manually 😥

I gave this idea moment and decided to prepare the links for all regions. Hope for less technical Power Automaters it will be useful 😁

If you are beginning your road of Error handling, then the attached article from Rob Windsor is a must-read (added in the references section).
Additionally, you might be also interested in learning other pattern for Try Catch with Do Until.

How to use

To use below link, just copy it and paste to Send email action after changing it mode to work with html:

Regions list

The URL used by flow for your region.

US environment: https://us.flow.microsoft.com/manage/environments/

<a href=https://us.flow.microsoft.com/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

United Kingdom environment: https://unitedkingdom.flow.microsoft.com/manage/environments/

<a href=https://unitedkingdom.flow.microsoft.com/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

Canadian environment: https://canada.flow.microsoft.com/manage/environments/

<a href=https://canada.flow.microsoft.com/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

EMEA environment: https://emea.flow.microsoft.com/manage/environments/

<a href=https://emea.flow.microsoft.com/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

GCC environment: https://gov.flow.microsoft.us/manage/environments/

<a href=https://gov.flow.microsoft.us/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

GCC High environment: https://high.flow.microsoft.us/manage/environments

<a href=https://high.flow.microsoft.us/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

DoD environment: https://flow.appsplatform.us/manage/environments/

<a href=https://flow.appsplatform.us/manage/environments/@{workflow()['tags']['environmentName']}/flows/@{workflow()['name']}/runs/@{workflow()?['run']?['name']}>Open flow @{workflow()['tags']['flowDisplayName']}</a>

If your region is not listed here, navigate to flow.microsoft.com and copy the URL the page directs to from the browser.

OR:
If I missed environment form list, please let me know and I will add it. My aim is to make it simple for others 🤩

References

I found one useful resources around this topic: Reference guide for functions in expressions – Azure Logic Apps | Microsoft Docs that helped me to resolve the mystery.

Next, I was able to found another very useful resource from Rob Windsor: Power Automate (Microsoft Flow) Error Handling – Rob Windsor’s Weblog (msmvps.com). After reading the whole article, I notice that that Rob also found the way to create link directly to Flow failed instance. Huge respect and for sure I will check his other articles for sure.