cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
cjs321
Level: Powered On

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
Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,823)