json Power Automate Adaptive卡未显示在我的电子邮件中

sc4hvdpw  于 2023-05-30  发布在  其他
关注(0)|答案(1)|浏览(165)

嗨,我一直在使用Power Automation创建一个由Power Apps应用程序触发的审批流程。电子邮件包含用于存储响应的自适应卡的json。当我收到电子邮件时,我看不到自适应卡。我已经在行动卡 Jmeter 板上创建了一个配置文件,自从我被批准以来已经超过12个小时了。我不知道发生了什么事。下面是我的自适应卡的JSON。

{   "type": "AdaptiveCard",   "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",   "version": "1.4",   "body": [
    {
      "type": "TextBlock",
      "text": ⁠ Compose_Inputs × ⁠,
      "wrap": true,
      "id": "lblID"
    },
    {
      "type": "TextBlock",
      "text": ⁠ Condition3_Value × ⁠,
      "wrap": true,
      "id": "lblGid"
    },
    {
      "type": "Input.ChoiceSet",
      "choices": [
        {
          "title": "Approve",
          "value": "1"
        },
        {
          "title": "Reject",
          "value": "2"
        }
      ],
      "placeholder": "Choose whether to accept or reject the declaration",
      "id": "cmbApproval"
    },
    {
      "type": "RichTextBlock",
      "inlines": [
        {
          "type": "TextRun",
          "text": "Enter the reason for a rejection here"
        }
      ],
      "id": "redtRejection"
    },
    {
      "type": "RichTextBlock",
      "inlines": [
        {
          "type": "TextRun",
          "text": "Reccomend some actions that need to be taken"
        }
      ],
      "id": "redtActionable"
    }   ],   "actions": [
    {
      "type": "Action.Http",
      "title": "Submit",
      "id": "btnSubmit",
      "method": "POST",
      "body": "{\n\"Approval\" : \"{{cmbApproval.value}}\",\n\"Actions\": \"{{redtActionable.text}}\",\n\"Rejection\": \"{{redtRejection.text}}\",\n\"Approval_ID\":\"{{lblID.text}}\",\n\"Gift_ID\":\"{{lblGid.text}}\"\n}",
      "url": "https://prod-78.westeurope.logic.azure.com:443/workflows/2ecc98c6673e4d88b2569fb6be6eae33/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=to-6fjShHwNxMqXywd-HNg5Wl-z95eiorM0w1ZyiZTs",
      "headers": [
        {
          "name": "Authorization",
          "value": ""
        },
        {
          "name": "Content-type",
          "value": "application/json"
        }
      ],
      "originator": "1e643d3f-b41b-4723-b72d-23a5e813a5ba"
    }   ],   "id": "btnSubmit" }
x6yk4ghg

x6yk4ghg1#

我知道有点晚了,我不确定这是否有帮助。但是在浏览了卡之后,我注意到您的自适应卡上有一些格式问题,有时我发现当我的自适应卡无法正常显示时,这是因为格式问题。
您可以尝试添加以下内容:

{
  "type": "AdaptiveCard",
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.4",
  "body": [
    {
      "type": "TextBlock",
      "text": "Compose_Inputs ×",
      "wrap": true,
      "id": "lblID"
    },
    {
      "type": "TextBlock",
      "text": "Condition3_Value ×",
      "wrap": true,
      "id": "lblGid"
    },
    {
      "type": "Input.ChoiceSet",
      "choices": [
        {
          "title": "Approve",
          "value": "1"
        },
        {
          "title": "Reject",
          "value": "2"
        }
      ],
      "placeholder": "Choose whether to accept or reject the declaration",
      "id": "cmbApproval"
    },
    {
      "type": "RichTextBlock",
      "inlines": [
        {
          "type": "TextRun",
          "text": "Enter the reason for a rejection here"
        }
      ],
      "id": "redtRejection"
    },
    {
      "type": "RichTextBlock",
      "inlines": [
        {
          "type": "TextRun",
          "text": "Recommend some actions that need to be taken"
        }
      ],
      "id": "redtActionable"
    }
  ],
  "actions": [
    {
      "type": "Action.Http",
      "title": "Submit",
      "id": "btnSubmit",
      "method": "POST",
      "body": "{\n\"Approval\": \"{{cmbApproval.value}}\",\n\"Actions\": \"{{redtActionable.text}}\",\n\"Rejection\": \"{{redtRejection.text}}\",\n\"Approval_ID\": \"{{lblID.text}}\",\n\"Gift_ID\": \"{{lblGid.text}}\"\n}",
      "url": "https://prod-78.westeurope.logic.azure.com:443/workflows/2ecc98c6673e4d88b2569fb6be6eae33/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=to-6fjShHwNxMqXywd-HNg5Wl-z95eiorM0w1ZyiZTs",
      "headers": [
        {
          "name": "Authorization",
          "value": ""
        },
        {
          "name": "Content-type",
          "value": "application/json"
        }
      ],
      "originator": "1e643d3f-b41b-4723-b72d-23a5e813a5ba"
    }
  ],
  "id": "btnSubmit"
}

相关问题