Hello,
Looking for some guidance from anyone with experience using MS Teams connectors, message cards, and freshservice api to post a note to a freshservice ticket. I am running into an issue finding the appropriate way to send authorization in the request headers from within the MS Teams Message card JSON.
Here is an example of the message card looks like and its JSON format
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "d67900",
"summary": "Service Request",
"sections": [
{
"activityTitle": "{{ticket.id}}",
"activitySubtitle": "{{ticket.subject}}",
"activityImage": "https://media.istockphoto.com/vectors/shopping-cart-icon-vector-id639201180?k=6&m=639201180&s=612x612&w=0&h=-bXAjxhS-GnxKai-e2XbaZY2Sum4BxrBBDo_b1isuHQ=",
"facts": [
{
"name": "Assigned to",
"value": "{{ticket.agent.name}}"
},
{
"name": "Status",
"value": "{{ticket.status}}"
},
{
"name": "Service Request Cost",
"value": "{{ticket.service_request_cost}}"
}
],
"markdown": true
}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "Open Ticket",
"targets": [
{
"os": "default",
"uri": "{{ticket.url}}"
}
]
},
{
"@type": "ActionCard",
"name": "Add Note",
"inputs": [
{
"@type": "TextInput",
"id": "note",
"isMultiline": true,
"title": "Add note here..."
}
],
"actions": [
{
"@type": "HttpPOST",
"name": "Submit",
"target": "https://cedservicedesk-fs-sandbox.freshservice.com/api/v2/tickets/{{ticket.id_numeric}}/notes",
"headers": [
{
"name": "content-type",
"value": "application/json"
},
{
"name": "authorization",
"value": "Basic encode(xxxAPIkeywouldgoherexxx)"
}
],
"bodyContentType": "application/json",
"body": "{{note.value}}"
}
]
}
]
}
I realize this is a rather specific issue and most likely requires more knowledge of MS Teams documentation but I just can’t seem to find an answer from any of their examples. Appreciate any advice given.
Thanks,
Zach