
May I ask for some suggestions from the community on how to construct an expression to send a "file.pdf" as an attachment using Office365.SendEmail please? Here is what I have tried without success:
Button_OnSelect: Office365.SendEmail("chris@me.org" ,"Your Package is on its Way!",HtmlText1_1.HtmlText,{IsHtml:true}, {Attachments:Table({Name:"BC.pdf", ContentBytes:pdf.document,'@odata.type':""})})
I guess I am completely lost.
Thank you for your ideas on how I might solve without using Flow.
Chris
Hi @ChrisChong,
May I know where did you get the 'pdf.Document' part? Is it a PDF viewer? If so, I'm afraid that you cannot use this syntax to define the ContentBytes property of an attachment. So far, it seems that you cannot add document files like word/excel/pdf.etc to PowerApps. So you could only send media attachments in PowerApps.
About adding documents ability in PowerApps, there is already an idea submitted and shown as Started status:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Attach-a-file-to-form/idi-p/20596
Yet I would suggest that you could try to start a Flow from PowerApps as a workaround. For detailed information, please refer to:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows
Other references:
Regards,
Mona