cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Powerapps Gallery / Collection - Images as attachments

Hi,

 

Please can you help me with the correct syntax required to send an email, using all data from a gallery / collection, pictures too?

 

So, i've managed to find the correct HTML syntax to extract data for all items in a gallery / collection, and it successfully transfers over to email.

 

The only thing i can't seem to figure out, is how do i get the images to attach onto the email?

 

syntax used to get the information from a gallery / collection into a HTML textbox: 

"<!DOCTYPE html>
<html>
<body>
<p>"&Concat(ClaimExpensesCollection,"Date Of Expense: "&DateOfExpense&" - "&Description,"<br></br>"&"<br></br>")&"
</html>"

 

My collection is called: ClaimExpensesCollection

The images column, is called Receipts

 

Thankyou 🙂

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Powerapps Gallery / Collection - Images as attachments

Hi @cjs321 ,

 

About how to format an email with basic HTML to create nice email reports:
https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

And the code for the image using the add image control is this:
Office365.SendEmail("xxx@xxx.com" ,
"Test Image" ,
"test image" ,
{Attachments:Table({Name:"xx.jpg";
 ContentBytes: xx.Image ; '@odata.type':""})})

 

But I don't it can be achieved to get together the HTML Text box plus the Image Attatched in the same office 365 email using one code. If you need this, consider to add an idea in below forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,014)