1

Want to display data in table like this in the message card. Any pointers???

enter image description here

1 Answers1

12

I was able to use message card itself for inserting HTML in the way below, the HTML went as a value against the key "text" and I made it a separate group under sections

{
  "@type": "MessageCard",
  "@context": "http://schema.org/extensions",
  "themeColor": "0076D7",
  "summary": "XXXX",
  "sections": [
    {
      "activityTitle": "XXXX",
      "activitySubtitle": "",
      "activityImage": "",
      "facts": [
        {
          "name": "XX",
          "value": "**1**"
        },
        {
          "name": "YY",
          "value": "**test**"
        }
      ],
      "markdown": true
    },
    {
      "startGroup": true,
      "text": "<table bordercolor='black' border= '2'><thead><tr style = 'background-color : Teal; color: White'><th>Task</th><th>Status</th><th>Start Time</th><th>End Time</th></tr></thead></thead><tbody ><tr><td>xxx</td><td>yyy</td><td>14:25</td></tr><tr><td>xxx</td><td>yyy</td><td>15:25</td><td>16:25</td></tr></tbody></table>"
    }
  ]
}
A l w a y s S u n n y
  • 36,497
  • 8
  • 60
  • 103