I have a power flow that is triggered by a HTTP request. I have added a trigger condition by requiring a key to restrict unauthorized calls, like seen below:
I want to store this key to an environmental variable and reference this value to trigger condition. How can this be done?
You can read the environment variable value in Power automate cloud flow trigger conditions using syntax like:
parameters('MyEnvVariable (cr86e_MyEnvVariable)')
Where MyEnvVariable
is Display name and cr86e_MyEnvVariable
is Name of environment variable.
Assuming your environment variable display name and name is as given in above example, you can use trigger condition like:
@equals(triggerOutputs()['headers']?['runKey'],parameters('MyEnvVariable (cr86e_MyEnvVariable)'))