
Hi,
I have two environments : Dev and Prod.
I have a dataflow created in Dev environment which is refreshed using Power Automate trigger 'Refresh a Dataflow' with following configuration
Group Type : Environment
Group : Dev_Environment_Name
Dataflow : Dataflow_Name
I will be publishing the flow and dataflow into production, but the Group us still defined as Dev_Environment.
Is there any way to dynamically choose the Environment Name so it can work both Dev and Prod based on the type of environment?
Hi @Farhanftp
You may use workflow function to get the environment name or id within the flow. Here is an example:
Add an expression in compose action to get the environment name or id. Expression needs to be added in the expression box as shown below:
workflow()?['tags/environmentName']
Use the output of compose action to set the environment name dynamically.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.