逻辑应用程序无法从电子邮件附件中提取json

问题描述 投票:0回答:1

所以我正在尝试从电子邮件附件中提取 json 文件。

然后我尝试解析 json 文件,但没有获取 json 文件本身的内容。

enter image description here

我想要做的是将名字和姓氏分配给变量,并稍后在逻辑应用程序中使用它。

我对 json 控件中的内容使用了以下组合:

base64(triggerBody()?['附件']?['ContentBytes'])

base64ToString(body('Getattachment')?['附件']?['ContentBytes'])

但请保留以下信息:

无法处理第“0”行和第“0”列的操作“Parse_JSON”输入中的模板语言表达式:“模板语言表达式 'body('GetAttachment')?['Attachments'][0]?['ContentBytes' ]' 无法评估,因为无法选择属性“0”。请参阅 https://aka.ms/logicexpressions 了解使用详细信息。'.

logic azure-logic-apps
1个回答
0
投票

使用以下设计对我有用:

enter image description here

base64ToString(body('Get_Attachment_(V2)')?['contentBytes'])

enter image description here

输入附件:

{
"firstName":"Rithwik",
"lastName":"Bojja"
}

enter image description here

输出:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.