For anyone wanting to get Adaptive Cards working with the new Teams workflow with local time conversion, the following config works: Step 1) Create the Meraki webhook receivers config as per the Meraki documentation. You will need to generate the public HTTPS webhook URL first from Step 3. Step 2) Create a custom webhook template, and use the following config in the Liquid Body field. Edit or remove the URL field if you want a picture in the webhook card. {
"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",
"body": [
{
"type": "Image",
"url": "ADD HTTPS URL FOR A PICTURE",
"altText": "Logo"
},
{
"type": "TextBlock",
"text": "**{{networkName}}**",
"wrap": true,
"size": "large"
},
{
"type": "TextBlock",
"text": "**Message**: {{alertType}} \n**Device**: {{deviceName}} \n**Alert Level**: {{alertLevel}} \n**Alert Data**: {{alertData | markdown_with_additional_formatting_for_teams}}",
"wrap": true,
"size": "medium"
},
{% if alertData.imageUrl %}
{
"type": "Image",
"url": "{{alertData.imageUrl}}",
"altText": "Alert Image"
},
{% endif %}
{
"type": "TextBlock",
"text": "**Alert Triggered**: {{occurredAt | date: '%Y-%m-%dT%H:%M:%S'}}",
"wrap": true,
"size": "medium"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.OpenUrl",
"title": "View Network",
"url": "{{networkUrl}}"
},
{
"type": "Action.OpenUrl",
"title": "View Device",
"url": "{{deviceUrl}}"
}
]
}
]
}
}
]
} Step 3) Open Teams, right click on the chat group and select Workflows. Create a new workflow based using the "Post to a Teams chat using an incoming webhook". Complete the wizard as per your requirements. Step 4) Edit the workflow and build out the following action flow: Schema config: {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"attachments": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"contentType": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"content": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"$schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"type": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"version": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"body": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object",
"properties": {
"type": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
}
}
},
"required": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"required": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
} Add custom Inputs expression: @{split(first(body('Parse_JSON')?['attachments'])['content']['body'][3]['text'], ': ')[1]} The final action requires you to create a custom Adaptive Card config. This can be generated by running a test flow and capturing the outputs from Action 1. Once you have a created this config, paste it into the Adaptive Card field and edit the following line to replace the time with the converted time output. Here's an example of the what your config should look like: {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "Image",
"url": "ADD CUSTOM URL FOR PICTURE
"altText": "Logo"
},
{
"type": "TextBlock",
"text": "**YOUR NETWORK NAME
"wrap": true,
"size": "large"
},
{
"type": "TextBlock",
"text": "**Message**: Power supply went down \n**Device**: DEVICE NAME Level**: critical \n**Alert Data**: \n num: 2",
"wrap": true,
"size": "medium"
},
{
"type": "TextBlock",
"text": "**Alert Triggered (NZST)**: @{body('Convert_time_zone')}",
"wrap": true,
"size": "medium"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.OpenUrl",
"title": "View Network",
"url": "LINK TO MERAKI NETWORK"
},
{
"type": "Action.OpenUrl",
"title": "View Device",
"url": "LINK TO MERAKI NETWORK"
}
]
}
]
} Here's the custom time line that needs to be added, using the output of the Converted Time action (add using dynamic content): Step 5) Run a test webhook from the Meraki dashboard, you should see a successful workflow with a message card posted into the Teams chat.
... View more