Dear Community,
I am trying to send pdf attachment via email and GraphAPI. However, I am unable to get through the contentBytes section. I have also tried sending FileContent directly but unable to.
"contentType": "application/pdf",
"message": {
"IsReadReceiptRequested": "true",
"IsDeliveryReceiptRequested": "true",
"subject": "@{items('Apply_to_each')?['Subject']}",
"body": {
"contentType": "Text",
"content": "@{items('Apply_to_each')?['NewBody']}"
},
"toRecipients": [
{
"emailAddress": {"address": "@{items('Apply_to_each')?['EmailTo']}" }
}
],
"attachments": [
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "@{outputs('Get_file_metadata')?['body/Name']}",
"contentType": "application/pdf",
"contentBytes": "@{base64(body('Get_file_content'))}"
}
}
]
},
"save To SentItems": "true",
}