Reputation: 35
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'.".'
Upvotes: 2
Views: 1267
Reputation: 6816
You need to click on Add dynamic content
and use the following expression:
base64(triggerBody()?['attachments']?['ContentBytes'])
Upvotes: 0