我使用Power Automate和Microsoft Lists构建了一个工作流,向用户发送电子邮件以更新列表中的记录。
我已经完成了大部分工作流程,现在我正在处理一些小错误。当用户单击列表中特定项目的链接时,我的一个流会被触发,他们会通过电子邮件收到一条可操作的消息,其中包含该项目的可操作消息更新表单,表单值预先填充了该列表的现有值。
以下是我的电子邮件中的内容(预先填充了记录的现有值):
当我在AT&T FOB下降:
在
Designer - Adaptive Cards
我遇到的问题:
保存按钮不是蓝色的
取消课程按钮不是红色的
AT&T FOB选项未默认为列表中的现有值
-发现了这一点,Power Automate传递的是“True”和“False”,自适应卡预期的是“True”或“False”
即使没有填写所需的值,“取消类”按钮也应保持活动状态
我必须设置version=1.0(如果我设置为1.4,action.http按钮将不显示)
此外,如果用户在outlook以外的其他地方打开电子邮件,如“此邮件必须在outlook中查看”,是否有显示邮件的方法?
代码:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"originator": "redacted",
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "As requested, here is your update form",
"wrap": true
},
{
"type": "TextBlock",
"text": "District: @{variables('District')}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Date: @{variables('Start Date')}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Class Size*",
"wrap": true
},
{
"type": "Input.Number",
"placeholder": "1",
"id": "size",
"value": @{variables('Class Size')} //replace with 1 in designer
},
{
"type": "TextBlock",
"text": "Start Time*",
"wrap": true
},
{
"type": "Input.Text",
"placeholder": "Start Time",
"id": "starttime",
"isRequired": true,
"label": "Start Time",
"errorMessage": "Required",
"value": "@{variables('Start Time')}"
},
{
"type": "TextBlock",
"text": "Class Location*",
"wrap": true
},
{
"type": "Input.Text",
"placeholder": "Class Location",
"id": "location",
"isRequired": true,
"label": "Class Location",
"errorMessage": "Required",
"value": "@{variables('Class Location')}"
},
{
"type": "TextBlock",
"text": "AT&T FOB*",
"wrap": true
},
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Yes",
"value": "true"
},
{
"title": "No",
"value": "false"
}
],
"placeholder": "AT&T Fob",
"id": "fob",
"label": "AT&T FOB",
"isRequired": true,
"errorMessage": "Required",
"style": "expanded",
"title": "@{variables('FOB Choice')}",
"value": "@{variables('FOB')}"
}
]
},
{
"type": "Container",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Http",
"title": "Save",
"method": "POST",
"url": "redacted",
"body": "{\n\"starttime\":\"{{starttime.value}}\",\n\"location\":\"{{location.value}}\",\n\"fob\":\"{{fob.value}}\",\n\"size\":\"{{size.value}}\",\n\"id\": @{triggerOutputs()['relativePathParameters']['id']}\n}",
"headers": [
{
"name": "Authorization",
"value": ""
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"style": "positive",
"id": "save"
},
{
"type": "Action.Http",
"title": "Cancel Class",
"style": "destructive",
"ignoreInputValidation": true,
"method": "POST",
"url": "redacted",
"body": "{\n\"starttime\":\"{{starttime.value}}\",\n\"location\":\"{{location.value}}\",\n\"fob\":\"{{fob.value}}\",\n\"size\":\"{{size.value}}\",\n\"id\": @{triggerOutputs()['relativePathParameters']['id']}\n}",
"headers": [
{
"name": "Authorization",
"value": ""
},
{
"name": "Content-Type",
"value": "application/json"
}
],
"id": "cancel"
}
],
"horizontalAlignment": "Left",
"spacing": "Medium",
"id": "cance"
}
]
}
]
}
以下是我的流程步骤。第一步是我粘贴的代码。