Power Automate Flows: How to find an environment’s GUID

Sending
User Review
0 (0 votes)

 

 

Power Automate provides a set of incredibly robust and powerful tools for business process automation, especially when used in conjunction with Dynamics and the Power Platform as whole.  To that end, we can leverage Power Automate to locate an environment’s GUID (globally unique identifier) in the first few steps of a flow run.  This gives flow builders the ability to allow certain components of a flow to run in whole or in a modified state based on whether or not the environment is a production or test/QA environment.

Power Automate Flow Steps

In our flow, we can create a Compose Action step and set the inputs to the following expression:

workflow()[‘tags’][‘environmentName’]
This expression will return the full GUID of the environment.  Since an environment’s GUID is non-volatile (i.e., it can never be changed), we can utilize this information to determine if the GUID relates to the Production (live) environment or not.
We could build this out further and create a Boolean variable that is set based on whether or not the GUID is the Production GUID.  This Boolean variable would be incredibly useful in other areas of our flow, for example, in determining whether or not an email should be sent in a sandbox or test/QA environment… (read full post on www.beringer.net)

The post Power Automate Flows: How to find an environment's GUID appeared first on CRM Software Blog | Dynamics 365.