AnsweredAssumed Answered

Email File from Document Library

Question asked by vibhavip on Oct 19, 2016

Hi,

I created a workflow that would send a email with an attachment using rest api and the web service action on nintex workflow on office 365. I have been able to successfully send the email with file that i manually converted to base64. However when i try to use [FileData] to convert the current file to base64 nothing happens and i get this error code due to that issue. 

 

{"error":{"code":"RequestBodyRead","message":"Cannot convert the literal '[FileData]' to the expected type 'Edm.Binary'."}}

 

 

 

My Code

 

{
"Message": {
"Subject": "Testing",
"Body": {
"ContentType": "Text",
"Content": "Please refer to attached document"
},
"ToRecipients": [
{
"EmailAddress": {
"Address": "Email not shown for privacy"
}
}
],
"Attachments": [
{
"@odata.type": "#Microsoft.OutlookServices.FileAttachment",
"Name": "Test.docx",
"ContentBytes": "[FileData]"
}
]
},
"SaveToSentItems": "true"
}

 

 

 

Thanks

Outcomes