Getting Workflow Details From A Power Automate Flow

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

Then we add an email along with the details from the flow.
Remember to add run after to the condition so it only runs on failed flow runs.

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

The final result (With HTML styling)

Like this post? Why not share it!

LinkedIn
WhatsApp
Facebook
Reddit
X
Email

View more blog posts

Using Environment Variables

4 min read

Read this blog

Setting Dataverse LookUp Value to Null Using Power Automate

1 min read

Read this blog

Getting Started With Power Automate

8 min read

Read this blog

Power Automate Email Reminders

2 min read

Read this blog

Get In Touch

Let’s talk. Send us a message, and we’ll help you explore the best Power Platform solution for your business

We can turn your mondain tasks into effective workflows, saving you and your business time and money