Incoming Webhook Use Custom Payload

Hi There,
We are trying to integrate Newrelic with Microsoft Teams. We have created incoming webhook and trying to use customer payload for JSON format. Can you help with if you have a ready example of JSON format.
We would like to have a similar output as we had in Slack before. Target, Conditiion, State, Chart, Threshold, Duration etc

Hi, @karapet.barseghyan: There are several previous posts about this in the forum. Here is one you may find helpful:

3 Likes

Hi There.
We managed Thanks a lot for the post.
We are struggling with how to add Targets name and link in JSON. When we have done we got an error response 400 due to testing.

{
“$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) - $SEVERITY”
},
{
“name”: “Details:”,
“value”: “$EVENT_DETAILS”
},
{
“name”: “Current State:”,
“value”: “$EVENT_STATE”
},
{
“name”: “Account:”,
“value”: “$ACCOUNT_ID $ACCOUNT_NAME”
},
{
“name”: “Targets:”,
“$TARGETS”: [{
“name”: “Test Target”,
“link”: “http://localhost/target/12345
}]
},
{
“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”
}]
}
]
}]
}

@karapet.barseghyan - If you are using Microsoft Teams, make sure you are using a standard webhook and not the Microsoft Connector created by Microsoft as it does not work.