Teams側で承認用のadaptive cardを作成
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"spacing": "None",
"style": "Person",
"selectAction": {
"type": "Action.OpenUrl",
"url": "@{triggerBody()?['{Link}']}"
},
"url": "https://x.gd/Bndio",
"size": "Medium",
"horizontalAlignment": "Left",
"backgroundColor": "bl"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Paid Time Off"
},
{
"type": "TextBlock",
"text": "Approval request",
"wrap": true,
"separator": true
},
{
"type": "TextBlock",
"text": "Nathaniel Palmer",
"weight": "Bolder",
"size": "Large",
"wrap": true
},
{
"type": "TextBlock",
"text": "Mon 8/14 → Mon 8/26",
"wrap": true,
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "Allowance before: 160 hours",
"wrap": true,
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "Staff already on leave: 4",
"wrap": true,
"spacing": "Small"
}
]
}
]
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Approve",
"style": "positive",
"id": "approve"
},
{
"type": "Action.Submit",
"title": "Deny",
"style": "destructive",
"id": "deny"
}
],
"horizontalAlignment": "Center"
}
]
}
Python