From a0d4c0d5e95931ba0115533ade27ba56d595dbd8 Mon Sep 17 00:00:00 2001 From: Limalbert96 Date: Wed, 15 Jan 2025 14:31:36 -0500 Subject: [PATCH] Update new-relic-webhook-for-microsoft-teams-workflow.mdx Fix indentation for payload template --- ...c-webhook-for-microsoft-teams-workflow.mdx | 196 +++++++++--------- 1 file changed, 99 insertions(+), 97 deletions(-) diff --git a/src/content/docs/alerts/get-notified/new-relic-webhook-for-microsoft-teams-workflow.mdx b/src/content/docs/alerts/get-notified/new-relic-webhook-for-microsoft-teams-workflow.mdx index f5562de54e9..641aea5393b 100644 --- a/src/content/docs/alerts/get-notified/new-relic-webhook-for-microsoft-teams-workflow.mdx +++ b/src/content/docs/alerts/get-notified/new-relic-webhook-for-microsoft-teams-workflow.mdx @@ -40,137 +40,139 @@ Microsoft is retiring Microsoft 365 webhook-based Connectors service in Teams by /> 3. On the Edit notification message screen, in the **Template** field, copy and paste the following payload: ```json +{ + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.adaptive", + "contentUrl": null, + "content": { + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.2", + "msteams": { "width": "full" }, + "body": [ { - "type": "message", - "attachments": [ - { - "contentType": "application/vnd.microsoft.card.adaptive", - "contentUrl": null, - "content": { - "$schema": "https://adaptivecards.io/schemas/adaptive-card.json", - "type": "AdaptiveCard", - "version": "1.2", - "body": [ - { "type": "ColumnSet", "columns": [ + + { + "type": "Column", + "items": [ + { + "type": "Image", + "style": "Person", + "url": "https://avatars.slack-edge.com/2022-06-02/3611814361970_f6a28959c2e7258660ea_512.png", + "size": "Small" + } + ], + "width": "auto" + }, + { - "type": "Column", - "items": [ - { - "type": "Image", - "style": "Person", - "url": "https://avatars.slack-edge.com/2022-06-02/3611814361970_f6a28959c2e7258660ea_512.png", - "size": "medium" - } - ], - "width": "auto" - }, - { - "type": "Column", - "items": [ - { - "type": "TextBlock", - "size": "large", - "weight": "bolder", - "text": "{{ priorityText }} priority issue is {{#if issueClosedAt}}CLOSED{{else}}{{#if issueAcknowledgedAt}}ACKNOWLEDGED{{else}}ACTIVATED{{/if}}{{/if}}" - }, - { - "type": "TextBlock", - "size": "large", - "wrap": "true", - "maxLines": "2", - "weight": "bolder", - "text": "[{{ issueTitle }}]({{ issuePageUrl }})" - } - ], - "width": "stretch" + "type": "Column", + "items": [ + { + "type": "TextBlock", + "size": "large", + "weight": "bolder", + "text": "{{ priorityText }} priority issue is {{#if issueClosedAt}}CLOSED{{else}}{{#if issueAcknowledgedAt}}ACKNOWLEDGED{{else}}ACTIVATED{{/if}}{{/if}}" + }, + { + "type": "TextBlock", + "size": "large", + "wrap": "true", + "maxLines": "2", + "weight": "bolder", + "text": "[{{ issueTitle }}]({{ issuePageUrl }})" + } + ], + "width": "stretch" } ] - }, - {{#if accumulations.conditionDescription.[0]}} - { + }, + {{#if accumulations.conditionDescription.[0]}} + { "type": "TextBlock", "text": {{ json accumulations.conditionDescription.[0] }}, "wrap": true - }, - {{/if}} - {{#eq "Not Available" violationChartUrl}} - {{else}} - { + }, + {{/if}} + {{#eq "Not Available" violationChartUrl}} + {{else}} + { "type": "Image", "url": {{ json violationChartUrl }} - }, - {{/eq}} - { + }, + {{/eq}} + { "type": "FactSet", "facts": [ { - "title": "*Impacted entities:*", - "value": "{{#each entitiesData.names}}{{#lt @index 5}}{{this}}{{#unless @last}},{{/unless}}{{/lt}}{{/each}}" + "title": "*Impacted entities:*", + "value": "{{#each entitiesData.names}}{{#lt @index 5}}{{this}}{{#unless @last}},{{/unless}}{{/lt}}{{/each}}" }, {{#if accumulations.policyName }} { - "title": "*Policy:*", - "value": {{ json accumulations.policyName.[0]}} + "title": "*Policy:*", + "value": {{ json accumulations.policyName.[0]}} }, {{/if}} {{#if accumulations.conditionName }} { - "title": "*Condition:*", - "value": {{ json accumulations.conditionName.[0]}} + "title": "*Condition:*", + "value": {{ json accumulations.conditionName.[0]}} }, {{#eq impactedEntitiesCount 1}} {{else}} { - "title": "*Total Incidents:*", - "value": {{ json impactedEntitiesCount}} + "title": "*Total Incidents:*", + "value": {{ json impactedEntitiesCount}} }, {{/eq}} {{/if}} { - "title": "Workflow Name:", - "value": {{ json workflowName }} + "title": "Workflow Name:", + "value": {{ json workflowName }} } ] - }, - { + }, + { "type": "ActionSet", "actions": [ - { - "type": "Action.OpenUrl", - "title": "📥 Acknowledge", - "url": {{ json issueAckUrl }} - }, - { - "type": "Action.OpenUrl", - "title": "✔️ Close", - "url": {{ json issueCloseUrl }} - }, - {{#if accumulations.deepLinkUrl}} - { - "type": "Action.OpenUrl", - "title": "🔎 View Query", - "url": {{ json accumulations.deepLinkUrl.[0] }}, - "mode": "secondary" - }, - {{/if}} - {{#if accumulations.runbookUrl}} - { - "type": "Action.OpenUrl", - "title": "📕 View Runbook", - "url": {{ json accumulations.runbookUrl.[0] }}, - "mode": "secondary" - } - {{/if}} - ] - } - ] - } - } - ] + { + "type": "Action.OpenUrl", + "title": "📥 Acknowledge", + "url": {{ json issueAckUrl }} + }, + { + "type": "Action.OpenUrl", + "title": "✔️ Close", + "url": {{ json issueCloseUrl }} + } + {{#if accumulations.deepLinkUrl}} + ,{ + "type": "Action.OpenUrl", + "title": "🔎 View Query", + "url": {{ json accumulations.deepLinkUrl.[0] }}, + "mode": "secondary" + } + {{/if}} + {{#if accumulations.runbookUrl}} + ,{ + "type": "Action.OpenUrl", + "title": "📕 View Runbook", + "url": {{ json accumulations.runbookUrl.[0] }}, + "mode": "secondary" + } + {{/if}} + ] } - } + ] + } + } + ] +} ``` 4. Click **Save message**.