When working with Power Automate, especially in environments where flows are triggered frequently or monitored closely, it’s incredibly useful to generate a direct link to a specific flow run. This allows you or your team to quickly inspect the run history, debug issues, or audit automation activity.
Here’s how you can retrieve workflow details and turn them into a clickable hyperlink to the flow run.
workflow() Function
Power Automate provides a built-in function called workflow()
that returns metadata about the current flow run. You can use this in a Compose action or directly within expressions.
Here’s an example the run details:
Now that we have the JSON object of Workflow() function we can now extact data from it, e.g.
workflow()?['tags']['triggertype']
This will then output:

Now that we know we can output details from the flow run we could generate a link from the flow run which would look something like:https://make.powerautomate.com/environments/{EnvironmentID}/flows/{FlowID}/runs/{RunID}
concat(
'https://make.powerautomate.com/environments/',
workflow()?['tags']['environmentName'],
'/flows/',
workflow()?['name'],
'/runs/',
workflow()?['run']['name']
)
This will then output a link like below:

Use Case
Now that we have been able to successfully output Workflow() details we could use this in a number of scenarios, for example maybe once a flow fails in our production environment we want to receive an email with link of the flow that takes us directly to the failed run.
For this we could use a condition, IF workflow()?[‘tags’][‘environmentName’]
= {ProductionEnvironmentID} Then IF TRUE Send Email

See Power Automate Error Handling for more details on how to do this.

The final result (With HTML styling)
