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?
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.