Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rendering] Power Automate "Post to a Teams channel/chat" only supports v1.4 #8965

Open
calo-chen opened this issue Jul 19, 2024 · 1 comment

Comments

@calo-chen
Copy link

Target Platforms

Other

SDK Version

N/A

Application Name

Microsoft Teams

Problem Description

This documentation says v1.5 is supported in Teams, but the "Post to a channel/chat when a webhook request is received" Power Automate workflow still only supports v1.4.

Posting to Teams via o365 connector is getting removed, we rely on v1.5 features to be able to display our automated messages correctly.

Screenshots

No response

Card JSON

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "${title}"
        },
        {
            "type": "Table",
            "columns": [
                {
                    "width": 1
                },
                {
                    "width": 1
                },
                {
                    "width": 1
                }
            ],
            "rows": [
                {
                    "type": "TableRow",
                    "cells": [
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        }
                    ]
                },
                {
                    "type": "TableRow",
                    "cells": [
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        }
                    ]
                },
                {
                    "type": "TableRow",
                    "cells": [
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        },
                        {
                            "type": "TableCell"
                        }
                    ]
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5"
}

Sample Code Language

No response

Sample Code

No response

@dbertacco
Copy link

dbertacco commented Jul 26, 2024

Hi everybody, same problem here.
I am trying to send adaptive cards from Databricks to a Power Automate webhook.
Databricks sends by default adaptive cards from version 1.5.

This is the schema:

Card JSON

[
  {
    "content": {
      "body": [
        {
          "type": "RichTextBlock",
          "separator": false,
          "inlines": [
            {
              "weight": "Bolder",
              "size": "Medium",
              "style": "heading",
              "text": "✅ test notification",
              "wrap": true,
              "fontType": "Monospace",
              "type": "TextRun"
            },
            {
              "size": "Medium",
              "style": "heading",
              "text": " — a run has completed successfully.",
              "wrap": true,
              "type": "TextRun"
            }
          ]
        },
        {
          "items": [
            {
              "type": "ColumnSet",
              "columns": [
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Workspace",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "some-env (213536131536153)",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                },
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Job",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "test notification",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                }
              ]
            }
          ],
          "type": "Container"
        },
        {
          "items": [
            {
              "type": "ColumnSet",
              "columns": [
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Run",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "test notification",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                },
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "State",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "Succeeded",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                }
              ]
            }
          ],
          "type": "Container"
        },
        {
          "items": [
            {
              "type": "ColumnSet",
              "columns": [
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Attempt",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "1",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                },
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Duration",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "4m 1s",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                }
              ]
            }
          ],
          "type": "Container"
        },
        {
          "items": [
            {
              "type": "ColumnSet",
              "columns": [
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Started at",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "2024-07-26 13:12:53Z",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                },
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Terminated at",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "2024-07-26 13:16:55Z",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                }
              ]
            }
          ],
          "type": "Container"
        },
        {
          "items": [
            {
              "type": "ColumnSet",
              "columns": [
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Launched",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "Manually",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                },
                {
                  "items": [
                    {
                      "weight": "Bolder",
                      "style": "columnHeader",
                      "text": "Run as",
                      "wrap": true,
                      "type": "TextBlock"
                    },
                    {
                      "text": "[email protected]",
                      "wrap": true,
                      "type": "TextBlock"
                    }
                  ],
                  "type": "Column",
                  "width": "stretch"
                }
              ]
            }
          ],
          "type": "Container"
        }
      ],
      "version": "1.5",
      "actions": [
        {
          "title": "View workspace",
          "type": "Action.OpenUrl",
          "url": "https://www.google.com"
        },
        {
          "title": "View job",
          "type": "Action.OpenUrl",
          "url": "https://www.google.com"
        },
        {
          "title": "View run",
          "type": "Action.OpenUrl",
          "url": "https://www.google.com"
        }
      ],
      "type": "AdaptiveCard",
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
    },
    "contentType": "application/vnd.microsoft.card.adaptive",
    "contentUrl": null
  }
]

Teams posts the message in the channel with the following error:
We're sorry, this card couldn't be displayed

Thank you in advance for your support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants