How to get Power Automate flow information directly in the flow run


You can use the workflow() expression in Power Automate to get environment, flow, and run information directly in your flow. This can be useful for tasks like sending error messages, automating restarts of expired flows, or differentiating between DEV and PROD environments. The workflow() expression provides values such as environment id, workflow id, workflow name, and run id. You can use expressions to extract these values from the output JSON. However, to get the environment name, you'll need to use the "List my Environments" action and filter the array to get the current environment's display name. By getting this information directly from the flow, you can avoid hard coding values or manually updating environment variables.


Article 3m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time