Integrating Zendesk into Microsoft Teams
For those wanting to have notifications for individual ticket notifications (i.e. individual ticket assigned to Group, individual ticket assigned to person, etc.) into MS Teams, use the documentation listed at https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference, and use the "Card Playground" (https://messagecardplayground.azurewebsites.net/) to test your code. This was extremely helpful when setting up a card style notification into MS Teams, for notifying specific teams of tickets that were assigned to their Group/Queue, as it seems MS Teams only accepts JSON written in a specific way.
To assist with clarifying what I did...
- Created the MS Teams webhook (from MS Teams); You will need to retain a copy of the webhook link provided by MS Teams, in order to add the Extension within Zendesk; I suggest copying the details into something like Notepad.
- From Zendesk, go to the "Extensions" section, and click on "Add Target"
- Choose "HTTP" as your Target type
- The "URL" is going to be the webhook URL pulled from MS Teams (from Step 1); "Method" will be set to "POST"; "Content Type" will be set to "JSON"
- After creating your Extension, you will then want to create your Trigger. Once you have all the necessary parameters (i.e. "Meet All" and "Meet Any Conditions") setup, you will want your "Actions" section to have the "Notify Target" option (pointing to the Extension you created). Within the "JSON Body", you will specify your JSON code, which I used the above "MS DOCS" link to assist with. For my code, I used something like this:
## {
## "@context": "http://schema.org/extensions",
## "@type": "MessageCard",
## "themeColor": "ffd517",
## "title": "A ticket has been assigned to the Group",
## "summary": "Zendesk",
## "sections": [
## {
## "facts": [
## {
## "name": "Ticket ID",
## "value": "{{ticket.id}}"
## },
## {
## "name": "Ticket URL",
## "value": "{{ticket.link}}"
## }
## ]
## }
## ]
## }
I included the hash-marks, to ensure the coding didn't cause problems with this posting. This is how I was able to post details outside of the default "Ticket View" option that is natively available, while bypassing the issues I ran into with my original JSON code.
-
Any way to add a Hyperlink. I added URL but it's coming as plain text. I tried adding a @type as openuri but didn't work
-
@Sam Arora,
My apologies for the delayed response; I wound up with the same issue, so I add JSON code for adding a button, that includes the different OS options...
## "potentialAction": [
## {
## "@type": "OpenUri",
## "name": "View in Zendesk",
## "targets": [
## {
## "os": "default",
## "uri": "{{ticket.link}}"
## },
## {
## "os": "iOS",
## "uri": "{{ticket.link}}"
## },
## {
## "os": "android",
## "uri": "{{ticket.link}}"
## },
## {
## "os": "windows",
## "uri": "{{ticket.link}}"
## }
## ]
## }
## ]This way, people can still quickly get to the ticket without needing to copy/paste the ticket details into Zendesk. Hopefully this helps you out, and again, my apologies on the delayed response.
~Konstantin
-
If we have multiple groups in Zendesk each with their own Team in MS teams, would I have to create multiple MS teams webhooks and therefore multiple Zendesk extensions? Or can I use the same web hook and Zendesk extension?
-
My apologies for not responding to this sooner, as I didn't get a notification for your post; You will need to create a webhook for each, as MS Teams requires the webhook details pulled from the Teams channel being configured.
As for the Extensions, you will have to generate one for each, as the webhooks are unique, and the Extension requires the specific webhook for sending over the details into MS Teams,
I hope this helps.
~Konstantin
-
Hi
Is there a way to integrate the Zendesk community posts to a Teams channel? (not the tickets)
Thanks
Merav
-
Hi Merav -
There's no out of the box integration between Gather and Teams. You may be able to configure it using the API, but we don't have anything set up for that purpose at the moment.
-
could you please paste the whole JSON code with clickable buttons? Are those two JSON codes merged into one, or are they separate?
Thanks!
-
Olli,
The two JSON Code examples I provided are merged into one; Here is the code I used for having one of our teams' ticket details post directly to their MS Teams channel:
{
"@context": "http://schema.org/extensions",
"@type": "MessageCard",
"themeColor": "ffd517",
"title": "Ticket #{{ticket.id}} has been assigned to the Group",
"summary": "Zendesk",
"sections": [
{
"facts": [
{
"name": "Ticket ID",
"value": "{{ticket.id}}"
},
{
"name": "Subject",
"value": "{{ticket.title}}"
},
{
"name": "Requester",
"value": "{{ticket.requester}}"
},
{
"name": "Description",
"value": "{{ticket.description}}"
}
]
}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "View in Zendesk",
"targets": [
{
"os": "default",
"uri": "{{ticket.link}}"
},
{
"os": "iOS",
"uri": "{{ticket.link}}"
},
{
"os": "android",
"uri": "{{ticket.link}}"
},
{
"os": "windows",
"uri": "{{ticket.link}}"
}
]
}
]
} -
Great, thank you Michael Konstantin, now it's working properly for us!
Please sign in to leave a comment.
9 Comments