Azure Logic App not posting dynamic content of message in Slack/Teams

Rajesh Kumar Mishra 91 Reputation points
2021-10-01T08:26:29.133+00:00

I have established an integration between Azure Logic App and Slack Channel for posting the Azure Service Health Alert to the Slack Channel.

Logic App Designer :

  • I am using HTTP trigger -> template from MS doc (https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-common-schema-definitions ) for JSON payload schema .
  • Have made sure Common Alert Schema is enabled on the respective Action Group
  • I was able to establish the connection between Teams & Slack Channel for posting the Message.
  • In the Message Body I am using combination of Static and Dynamic Contents
  • However when the Alert is triggered to Slack and Teams Channel I see the Dynamic Content values are missing (as if passed null) , for eg. for Title : <title_dynamic_content> it only post "Title :"

could someone please help ?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,322 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,801 Reputation points
    2021-10-05T08:16:02.27+00:00

    @Rajesh Kumar Mishra If the value is coming null then the Request Body JSON schema would be incorrect thereforethe value are not captured correctly. The suggestion would be use the body value in your screenshoot to generate the schema using the Use sample payload to generate schema option of your Request trigger

    If your generated schema matches the request body that you are sending then the value should be assigned correctly as in the below image when I navigate to the run history

    137703-image.png

    As I have tested with the below sample json input you will not see all the fields as per your screenshoot. You can use the body value of your request and then generate the right schema.

    {  
       "schemaId":"azureMonitorCommonAlertSchema",  
       "data":{  
          "essentials":{  
             "alert ID":"/subscriptions/guid",  
             "alertRule":"test",  
             "severity":"Sev4",  
             "signalType":"Activity Log",  
             "monitorCondition":"Fired",  
             "monitoringService":"ServiceHealth",  
             "alertTargetIDs":[  
                "/subscriptiions/subscriptionID"  
             ],  
             "originAlertId":"newid",  
             "firedDateTime":"2021-10-02T00:40:03.7826873",  
             "description":"Security advisor",  
             "essentialsVersion":"1.0",  
             "alertContextVersion":"1.0"  
          },  
          "alertContext":{  
             "authorization":null,  
             "channels":1,  
             "propeties":{  
                "title":"RCA etc"  
             }  
          }  
       }  
    }  
    

    137620-image.png

    Please let me know if you still facing the issue.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.