Here’s how you can use Environment Variables in your environment in Power Automate and Canvas Apps!
In case you are looking to create Environment Variables, here’s the post: Environment Variables in Power Apps and Power Automate
Here’s how you can use Environment Variables in a Flow –
- You can’t use/access Environment Variables in a Flow which is not in a solution –
Environment Variables are accessible in the Dynamic Content section on the very top of the list. [Since the below Flow is outside a Solution, you can’t see the Environment Variables]
- Now, this Flow is within a Solution –
- And then you access the Dynamic Content, you can see the Environment Variables.
- And when you Run the Flow, the Environment Variable will show the value based on the Data Type set for the variable at appropriate places –
Unlike Power Automate Flow, Environment Variables in Canvas Apps can be utilized even if the Canvas App was created outside a solution –
- In a Canvas App, click to Add Data Source.
- On the Environment Variable Definitions/Values is added to the Canvas App as Data Sources, let’s take a simple Text control to read the Value from the Environment Variable used in the above Flow example –
I’ll use Lookup() function in Power Automate to fetch the value of the Environment Variable by it’s Schema Name –
Even if you only added Environment Variable Values table as Data Source, the Environment Variable Definition too will be added once you use the Lookup() function to fetch the value.
Hope this was useful!
Here are some Power Automate posts you want to check out –
- Environment Variables in Power Apps and Power Automate
- Select the item based on a key value using Filter Array in Power Automate
- Select values from an array using Select action in a Power Automate Flow
- Blocking Attachment Extensions in Dynamics 365 CRM
- Upgrade Dataverse for Teams Environment to Dataverse Environment
- Showing Sandbox or Non Production Apps in Power App mobile app
- Create a Power Apps Per User Plan Trial | Dataverse environment
- Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
- Co-presence in Power Automate | Multiple users working on a Flow
- Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
- Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
- Call a Flow from Canvas Power App and get back response | Power Platform\
- FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
- Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
- Asynchronous HTTP Response from a Flow | Power Automate
- Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
- Converting JSON to XML and XML to JSON in a Flow | Power Automate