web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / send an email with the...
Power Apps
Answered

send an email with the image taken by camera control

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

 i  need to add another one option in the email that i have a camera control (camera1)and the gallery control image(gallery1). while taking photo those image are captured and stored in image box. 

The queries is how to add that image to the email attachments on clicking submit.

i already have a email function like this:

If(
Dropdown2.Selected.Value = "Safety " ||
Dropdown2.Selected.Value = "Quality ",
Office365Outlook.SendEmailV2("Gggg_Ghhh@cat.com",Dropdown2.Selected.Value,"<table><tr><td><b>Observation:</b></td><td>" & Message_TextInput &"</td></tr></table>",{Bcc:"",Importance:"Low"})
)

i need to add taken image with this email.

 

thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your scenario?

    Do you want to attach these images within the Gallery as attachments of the Outlook email?

     

    I assume that you store the capture image from your Camera control into a collection, then bind the collection to the Gallery, is it true?

     

    I have made a test on my side, please consider take a try with the following workaround:

    Set the OnSelect property of the Camera control to following:

    Collect(
     ImageCollection, 
     {
     FileName: "Picture"&CountRows(ImageCollection)&".jpg", 
     FileContent: Camera1.Photo
     }
    )

    Set the Items property of the Gallery to following:

    ImageCollection

    within the Gallery, set the Image property of the Image control to following:

    ThisItem.FileContent

     

    After that, modify your email function as below:

    If(
     Dropdown2.Selected.Value = "Safety " || Dropdown2.Selected.Value = "Quality ",
     Office365Outlook.SendEmailV2(
     "Gggg_Ghhh@cat.com",
     Dropdown2.Selected.Value,
     "<table><tr><td><b>Observation:</b></td><td>" & Message_TextInput &"</td></tr></table>",
     {
     Bcc: "",
     Importance: "Low",
     Attachments: ForAll( // Add formula here
     Gallery1.AllItems, // Gallery1 represents the Gallery in your app, where you display your captured image
     {
     Name: FileName,
     ContentBytes: Image1.Image,
     '@odata.type' : ""
     }
     )
     }
     )
    )

    or

    If(
     Dropdown2.Selected.Value = "Safety " || Dropdown2.Selected.Value = "Quality ",
     Office365Outlook.SendEmailV2(
     "Gggg_Ghhh@cat.com",
     Dropdown2.Selected.Value,
     "<table><tr><td><b>Observation:</b></td><td>" & Message_TextInput &"</td></tr></table>",
     {
     Bcc: "",
     Importance: "Low",
     Attachments: ForAll( // Add formula here
     ImageCollection,
     {
     Name: ImageCollection[@FileName],
     ContentBytes: ImageCollection[@FileContent],
     '@odata.type' : ""
     }
     )
     }
     )
    )

     

    More details about sending an email along with attachments, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outlook#send-a-message-with-an-attachment

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard