NewRelic Microsoft Teams Integration Issue

Synthetics Alert channel: https://alerts.newrelic.com/accounts/2571849/channels/3218035

I tried to integrate NewRelic with Microsoft Teams.
I created a webhook from the Microsoft Teams, and I filled the webhook url in Synthetics Alert channel. However, when i tried to test it, I cannot see any notification from Teams.

I got this message when I tried to send a test notification(a popup message):

{
response: 200,
Notification request ignored - NewRelic unknown event
}

Hi, @vyao: You may find this thread helpful:

1 Like

Thank you for the information. Actually I tried before I created this ticket.

I also tried in another account: https://alerts.newrelic.com/accounts/1218574/channels/3227229

Is it because I’m use the NR add-on on Heroku?

@vyao

It looks like that blog post has been removed by the author, so I can’t see the advice it had provided. However, it looks like there may be more required fields than just “title” and “text”. Like Phil, I don’t have access to Teams to test any of this, but this Teams support article was updated quite recently and provides detailed example of webhook formatting: https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using

2 Likes

I just completed an integration and had to use a plain MS Teams webhook connector instead of the ‘New Relic’ connector plugin. There is a support thread from 2018 that I got my MS Teams custom JSON payload from:

{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
   "title": "New Relic $EVENT_TYPE",
   "text": "Runbook: $RUNBOOK_URL",
   "themeColor": "B286BC",
   "sections": [
    {
        "activityTitle": "Policy: $POLICY_NAME - Condition: $CONDITION_NAME",
        "activityImage": "https://static.intercomassets.com/avatars/792690/square_128/newrelic_logo-1476726027.png?1476726027",
        "activitySubtitle": "$CONDITION_NAME at $TIMESTAMP",
        "facts": [
          {
            "name": "NewRelic Incident #:",
            "value": "([$INCIDENT_ID]($INCIDENT_URL)) - $SEVERITY"
          },             
          {
            "name": "Details:",
            "value": "$EVENT_DETAILS"
          },
          {
            "name": "Current State:",
            "value": "$EVENT_STATE"
          },               
          {
            "name": "Account:",
            "value": "$ACCOUNT_ID $ACCOUNT_NAME"
          }              
        ]        
    },
    {
        "title": "**Violations - CRITICAL / WARNING**",
					"facts": [          
          {
            "name": "Open:",
            "value": "$OPEN_VIOLATIONS_COUNT_CRITICAL / $OPEN_VIOLATIONS_COUNT_WARNING"
          },
          {
            "name": "Closed:",
            "value": "$CLOSED_VIOLATIONS_COUNT_CRITICAL / $CLOSED_VIOLATIONS_COUNT_WARNING"
          }						
        ]
    },    
    {
        "title": "Chart",
        "images": [
            {
                "image":"$VIOLATION_CHART_URL"
            }
        ]
    }
  ],
"potentialAction": [
 {
  "@type": "OpenUri",
  "name": "View Incident",
  "targets": [
    { "os": "default", 
      "uri": "$INCIDENT_URL" 
    }
  ]
},
    {
  "@type": "OpenUri",
  "name": "Acknowledge Incident",
  "targets": [
    { "os": "default", "uri": "$INCIDENT_ACKNOWLEDGE_URL" }
  ]
},
    {
  "@type": "OpenUri",
  "name": "Open Alert Policy",
  "targets": [
    { "os": "default", 
      "uri": "$POLICY_URL" }
  ]
},    
{
  "@type": "OpenUri",
      "name": "Open ServiceNow",
      "targets": [
        { "os": "default", 
          "uri": "https://xxxxxxxxxx.service-now.com/nav_to.do?uri=%2Fhome.do%3F" }
      ]
    }      
  ]
}
7 Likes

Thank you @Joshua.Coleman for sharing your custom JSON payload! :star_struck:

2 Likes