I have created a flow that would get the PDF from a SharePoint Attachment column and send it as an email attachment.
Whenever I try to open the PDF from the email , it gives me PDF is corrupt error . The PDF opens fine from the SharePoint List
Below is the flow
Under ContentBytes , I have used different expressions as given below however the PDFs are getting corrupted
Solved! Go to Solution.
@Anonymous , please use the Attachments Content directly in the Array as shown in below screenshot
okay thats strange, i did try using Attachment Content and it worked for me. Can you share screenshot of send email action which shows attachment property.
I am not sure why PA changes the contentbytes to AttachmentContent as shown below
Even if I change the ContentBytes to expression, it would fail
Also tried base64(outputs('Get_file_content')?['content']) , no luck
It should work with Attachment Content, i tried with Base64 it doesnt work. Are you testing by using Test function from PA, if yes, can you try actually adding new item or editing existing item and test?