Microsoft Teams Webhook Payload

Für die Anbindung von Drittanbieter-Tools stellt Microsoft seine Office 365-Konnektoren zugunsten der Workflows-Variante ein. Aus diesem Grund hat sich der vordefinierte Webhook in Zammad geändert. Falls Sie den alten oder neuen Standard-Payload benötigen, finden Sie diese unten.

Payload für Office Konnektoren (alt)

{
   "@type": "MessageCard",
   "@context": "http://schema.org/extensions",
   "themeColor": "#{ticket.current_state_color}",
   "title": "#{ticket.title}",
   "text": "#{notification.message}",
   "sections": [
       {
       "text": "#{notification.changes}"
       },
       {
       "text": "#{notification.body}"
       }
   ],
   "potentialAction": [
       {
       "targets": [
           {
           "os": "default",
           "uri": "#{notification.link}"
           }
       ],
       "@type": "OpenUri",
       "name": "Ticket##{ticket.number}"
       }
   ]
}

Payload für Workflows (neu)

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": null,
      "content": {
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
          {
            "type": "TextBlock",
            "text": "#{ticket.title}",
            "color": "#{ticket.current_state_color}",
            "weight": "bolder",
            "size": "large",
            "wrap": true
          },
          {
            "type": "TextBlock",
            "text": "#{notification.changes}",
            "wrap": true
          },
          {
            "type": "TextBlock",
            "text": "#{notification.body}",
            "wrap": true
          },
          {
            "type": "ActionSet",
            "actions": [
              {
                "type": "Action.OpenUrl",
                "title": "#{config.ticket_hook}#{ticket.number}",
                "url": "#{notification.link}"
              }
            ]
          }
        ]
      }
    }
  ]
}