2023年5月31日 星期三

[筆記]發送訊息至Teams頻道(webhook連接器)

  •  參考:
  • 作法:
    • 建立Webhook連接器。
    • 程式呼叫weebhook發送訊息。
    • 簡易:
      • {"text":"message"}
      • {"text":"message","title":"this is title."}
    • 進階:
      • {"text":"message","title":"this is title."
          "sections": [
            {
              "activityTitle": "Section標題",
              "activitySubtitle": "Section次標題",
              "activityText": "Section內文"
            }]"
         }
      • {"text":"message","title":"this is title."
          "sections": [
            {
              "activityTitle": "Section標題",
              "activitySubtitle": "Section次標題",
              "activityText": "Section內文"
            }
          ,{
              "title": "很像表格的title",
              "facts": [
                {
                  "name": "欄位名",
                  "value": "內文"
                },...
            ]"
         }
      • potentialAction ...etc