Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Help Please: Sending an email attachment using Office365.SendEmail()

(1) ShareShare
ReportReport
Posted on by

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

Categories:
  • Verified answer
    v-monli-msft Profile Picture
    on at
    Re: Help Please: Sending an email attachment using Office365.SendEmail()

    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:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outlook

    https://community.powerapps.com/t5/General-Discussion/Sending-Emails-using-Office365-SendEmail/td-p/34620

     

    Regards,

    Mona

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1