Blog

Smart,Industry,Concept.,Automation,And,Data,Exchange,In,Manufacturing,Technologies.

Locate an Environment in Power Automate Flow

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.

Locating an Environment’s GUID

We can locate our environment’s GUID by navigating to Advanced Settings (in Dynamics 365 classic experience) > CustomizationsDeveloper Resources.  Our environment’s GUID is located in the ID field in the Instance Reference Information section.

Contact Beringer Today!

We love to implement Microsoft Dynamics 365 and Power Platform functionality here at Beringer.  We’ve been working with Microsoft Dynamics since its inception, and we’re always finding innovative ways to implement the latest tools and help automate business processes.

Beringer Technology Group, a leading Microsoft Partner specializing in Microsoft Dynamics 365 and CRM for Distribution also provides expert Managed IT ServicesBackup and Disaster RecoveryCloud Based Computing, Email Security Implementation and Training,  Unified Communication Solutions, and Cybersecurity Risk Assessment.