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!!!

Monday, 28 August 2023

Web Resource vs PCF vs Canvas App - which of the one is used?

While started working on specific Business Requirements related to custom layout, there is a always common question that "where to start, which of the component needs to use?", so explaining component in brief to get an idea for the particular Business Requirements.


  • PCF (PowerApps Component Framework): PowerApps Component Framework (PCF) is a technology within the Microsoft Power Platform that allows developers to create custom components for use within Canvas Apps, Model-Driven Apps, and even in the Unified Interface of Dynamics 365. PCF enables you to create custom UI controls using familiar web development technologies like HTML, CSS, and JavaScript. These components can then be embedded into various app types and interact with data and events.


  • Canvas App: Canvas Apps are a part of the Microsoft Power Platform that enables you to create custom applications with a visual interface. These apps are typically built by users who may not have deep coding skills, as they rely on a drag-and-drop interface to design screens and logic. Canvas Apps allow you to connect to various data sources, including databases, SharePoint lists, and other services, and then build user interfaces and workflows using a visual designer. They can incorporate various controls and elements to create interactive user experiences.


  • Web Resource: A Web Resource is a concept primarily used in the context of Dynamics 365 and Power Apps to include custom web content within an application. A web resource can consist of HTML, JavaScript, CSS, or other web-related files. These resources can be used to extend the functionality of the platform by embedding custom UI elements, scripts, or even external web content directly within an application's user interface.


In summary:

  • PCF is a way to create custom UI components that can be used in various app types within the Power Platform.
  • Canvas Apps are custom applications with visual interfaces created using a drag-and-drop design approach.
  • Web Resources are used to include custom web content or scripts within Dynamics 365 or Power Apps.

The choice between these technologies depends on your specific requirements and your level of coding expertise. If you're looking to create custom UI components with more complex interactions, PCF might be the way to go. For building full-fledged applications with a visual interface, Canvas Apps could be the better choice. And if you need to include custom web content or scripts within your application, Web Resources can help you achieve that.

 

References:



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

Friday, 23 June 2023

Portal Revolution : ADX Portal, Dynamics Portal, PowerApps Portal, and Power Pages

ADX Portal, Dynamics Portal, PowerApps Portal, and Power Pages are all Microsoft technologies related to building web portals and applications. Here's a brief overview of each:


ADX Portal: ADX (Adxstudio) is a web portal framework that was acquired by Microsoft and integrated into Dynamics 365 Customer Engagement. It provides a platform for building and customizing web portals that can interact with Dynamics 365 data. ADX Portals are typically used for customer self-service portals, partner portals, or community portals.



Dynamics Portal: Dynamics Portal refers to the web portal functionality that is included in the Dynamics 365 suite of business applications. It allows organizations to create and customize portals for various purposes, such as customer support, employee self-service, or vendor management. Dynamics Portal provides integration with Dynamics 365 data and allows users to access and interact with relevant information.



PowerApps Portal: PowerApps Portal is a component of the Microsoft Power Platform, which includes PowerApps, Power Automate (formerly Flow), and Power BI. PowerApps Portals allow you to build externally facing websites or portals that provide access to data and processes from various sources, including Dynamics 365, SharePoint, and custom connectors. It provides a low-code environment for designing and deploying portals.



Power Pages: Power Pages is not a specific Microsoft product or technology. It might refer to a feature or concept related to the Power Platform or PowerApps, but without further context, it is challenging to provide specific information. If you can provide additional details or clarify your question, I would be happy to assist you further.



In summary, ADX Portal and Dynamics Portal are related to building web portals that integrate with Dynamics 365, while PowerApps Portal is a broader platform for creating portals with data integration capabilities. Power Pages requires more information to provide a specific answer.


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 ...