Delsilon
Delsilon

Reputation: 157

Post request to logic app from action group

I am trying to send an email alert when certain conditions are met by creating an alert rule in Azure monitor. For this, I also created an action group which tells what action to take when trigger conditions are met. In logic app I am using dynamic content which will come through POST http request, but in action group on azure portal I don't see any option to populate those parameters for POST request. Can anybody help me how to make a post request with request parameters to logic app in Azure portal?

Upvotes: 0

Views: 629

Answers (1)

vijaya
vijaya

Reputation: 1741

There is no need to send parameters from Action group to logic app. When an action group is tested or the condition satisfied, automatically details will come in Http post request. Using expressions, you can retrieve details from Http post request to use in next action. I have reproduced issue from my side. Below are steps I followed,

  1. Created Action group in Azure monitor and added action type as Logic App. enter image description here

  2. Created logic app as shown below, enter image description here

  3. In Send Email action, I have used dynamic content from Http request trigger as shown below, enter image description here

  4. When I test action group, It triggered logic app and run details are shown below, Output of Http trigger: enter image description here

Send email Action: enter image description here 5. As You can see in above picture, I am not getting values in Send email action.

  1. So tried with writing expression instead of using dynamic content to get data from http trigger as shown below,
triggerbody()?['data']?['essentials']?['monitorCondition']
triggerbody()?['data']?['essentials']?['fireDateTime']

enter image description here 7. Tested logic app again and getting values as shown below, enter image description here Refer to this MS Doc for more information

Upvotes: 1

Related Questions