【问题标题】:Logic app -send email with attachment-"Unable to parse template language expression 'base64('triggerBody()?['contentBytes']')': "逻辑应用 - 发送带附件的电子邮件 - “无法解析模板语言表达式 'base64('triggerBody()?['contentBytes']')':”
【发布时间】:2021-08-19 00:40:21
【问题描述】:

在逻辑应用程序中处理带有附件的 http 触发器发送电子邮件。如下提供 json 输入

{
    "properties": {
        "bcc": {
            "type": "string"
        },
        "body": {
            "type": "string"
        },
        "cc": {
            "type": "string"
        },
        "subject": {
            "type": "string"
        },
        "to": {
            "type": "string"
        },
        "attachments":{
            "name":{
                "type":"string"
            },
            "ContentBytes":{
                "type":"string"
            }
        },
        "type":"object"
    },
    "type": "object"
}

以 base64 字符串格式传递附件。 但是在为内容变量配置附件时出现错误

无法解析模板语言表达式 'base64('triggerBody()?['contentBytes']')':预期令牌 'RightParenthesis' 和实际的 'Identifier'。"。'

【问题讨论】:

    标签: json http-post azure-logic-apps email-attachments azure-http-trigger


    【解决方案1】:

    您需要点击Add dynamic content 并使用以下表达式:

    base64(triggerBody()?['attachments']?['ContentBytes'])
    

    【讨论】:

      猜你喜欢
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      • 1970-01-01
      • 2019-08-06
      • 2015-08-28
      相关资源
      最近更新 更多