Sam's Microsoft Dynamics 365 Blog

Thursday, 22 May 2025

How to Get the Power Automate Flow Run URL Using Expressions

In many Power Automate projects, especially those involving approvals, error handling, or audit logs, it’s helpful to have a direct link to the current flow run instance. This is particularly useful for debugging or sending links to business users or admins to investigate failures.

In this blog post, I’ll show you how to generate the current Flow Run URL using a simple concat() expression in Power Automate.

๐ŸŽฏ Objective

We want to dynamically construct a URL like this during a flow run:

https://us.flow.microsoft.com/manage/environments/{EnvironmentId}/flows/{FlowId}/runs/{RunId}

You can then include this in an email notification, Microsoft Teams post, or Dataverse log for auditing and support purposes.

๐Ÿงช The Expression

Here’s the expression you can use in Power Automate:

concat('https://us.flow.microsoft.com/manage/environments/', workflow().tags.environmentName, '/flows/', workflow().name, '/runs/', workflow().run.name)

๐ŸŒ Replace us.flow.microsoft.com with the correct region URL if you are in a different geography (e.g., europe.flow.microsoft.com).


๐Ÿ›  Step-by-Step Guide

๐Ÿ“ Step 1: Create a Flow

  • Create an automated flow or manual flow.

  • Add a trigger like "Manually trigger a flow" or "When a record is created."

๐Ÿ“ Step 2: Add a Compose Action to Build the Flow Run URL

  1. Click + New Step.

  2. Select Compose.

  3. In the Inputs field, paste the expression:

        concat('https://us.flow.microsoft.com/manage/environments/', workflow().tags.environmentName, '/flows/', workflow().name, '/runs/', workflow().run.name)




๐Ÿ“ Step 3: Test the Flow

  1. Save and run the flow.

  2. Go to the Run history.

  3. Click on the latest run → Expand the Compose action.

  4. You’ll see the full Flow Run URL generated dynamically.





๐Ÿ“ Step 4 (Optional): Use in Email or Teams Notification

To make this link useful, add it to an email or message like this:

In Send an Email (V2):


Hi,

The flow has completed. You can view the run here:
@{outputs('Compose')}




✅ Benefits

  • Great for debugging failed runs

  • Helpful in audit trails or support processes

  • Can be stored in Dataverse, SharePoint, or sent via Teams


๐Ÿง  Final Thoughts

With just a single expression, you can make your flows much more transparent and easier to monitor. The next time something fails—or just finishes successfully—you’ll have a clickable link directly to that specific run.

Thanks for reading this article. Hope this Article will help you. Cheers!!!

How to Get the Power Automate Flow Run URL Using Expressions

In many Power Automate projects, especially those involving approvals, error handling, or audit logs, it’s helpful to have a direct link to ...