Kumudini Jadhav
Kumudini Jadhav

Reputation: 35

send email with pdf attachment using logic app : PDF is not getting opened. It got corrupted

enter image description here

Sending PDF in Base64 string, using json object. Converted Stream to Base64 before passing. Using Http trigger post for calling logic app enter image description here

Email are generated with pdf from logic app but PDF is not opening. Is Base64 content corrupted?

In Logic app, updated attachment content by ContentBytes => triggerBody()['attachments']?['ContentBytes'] and ContentBytes => base64(triggerBody()['attachments']?['ContentBytes'])

enter image description here

Upvotes: 1

Views: 1558

Answers (1)

Frank Borzage
Frank Borzage

Reputation: 6816

After some testing, you should use the base64ToBinary expression:

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

Upvotes: 0

Related Questions