2

Working on sending email on http trigger with attachments in logic app. Providing json input as below

{
    "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"
}

passing attachment in base64 string format. But while configuring attachments for content variable getting an error

Unable to parse template language expression 'base64('triggerBody()?['contentBytes']')': expected token 'RightParenthesis' and actual 'Identifier'.".'

enter image description here

Slava Rozhnev
  • 9,510
  • 6
  • 23
  • 39

1 Answers1

0

You need to click on Add dynamic content and use the following expression:

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

enter image description here

Frank Borzage
  • 6,292
  • 1
  • 6
  • 19