azureazure-logic-appsazure-function-app-proxy

How to pass a parameter to a logic app invoked from an alert


I have an Alert (Scheduled Query Request) that invokes an Action Group that invokes a Logic App that executes a Function App. The logic app is HTTP triggered. I would like to deploy the same alert on Test, Pre-Prod, Prod and pass the "environment" as a parameter from alert to the action group to the Logic App to the Function App. Is there a way to pass a parameter from the alert? Can you point me to a JSON sample?


Solution

  • Consider deploying a local version of the logic app to each environment and initializing a variable with the environment name at the start of the logic app. Use parameterized ARM templates and Azure Devops to apply the proper environment value to each. It can get a little messy mixing ARM and Logic App definitions, but it can be very rewarding in cases like these.