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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create HTML table from...
Power Apps
Unanswered

Create HTML table from Powerapps Gallery and send email with the table

(0) ShareShare
ReportReport
Posted on by 18

I'm not sure if this is more like a PowerApps question or Power Automate question...

But I could use some help on one of my PowerApps.

So I have this shopping cart Gallery in my PowerApps, like below screenshot.

NocturnalSec_1-1687850270714.png

A user can add many PPE items into this shopping cart and submit them all together.

What I want to achieve is that when the user clicks "Submit" button, we add every item from this shopping cart gallery into an HTML table with Power Automate flow triggered from PowerApps button and then add the HTML table into the email that we're going to send to the user who submitted all the items in this shopping cart.

Right now, I can only trigger the flow from the SharePoint list using "When an item is created" trigger, and if a user submits for example, 20 different items from a shopping cart, he is going to receive 20 emails. But I want him to receive only one email with a table that shows all 20 items.

I'm wondering if it's possible to achieve this.

Any help would be appreciated. 🙂

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @NocturnalSec,

    Do you want to send email with html table including all the submitted items?

    Could you please tell me that how you submit items, does this submit button exist inside or outside of the Gallery?

     

    Actually, we could send email with html table directly in Power Apps.

    I just assume that you want to submit the whole Gallery items, so you need to add a HTML text box to set the HTML text proeprty as:

    "<strong> Information: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
     <th>Title</th> <th> ActionID </th><th> ID </th>
     </tr>" & Concat(
     Gallery27.AllItems,
     "<tr>
     <td>" & Title & " </td>//Here is the field you want to include in the HTML table
     
     <td>" & ActionID & " </td>
     <td>" & ID & " </td> 
     
     </tr>"
    ) & "</table>"

    Then write a formula on a Button OnSelect property as below:

    Office365Outlook.SendEmailV2("xxx@microsoft.com","Notify",HtmlText1.HtmlText)

    vqiaqimsft_0-1687852835906.png

     

  • NocturnalSec Profile Picture
    18 on at

    Hi Qi, thank you so much!

    I have the HTML table created in my PowerApps successfully according to your instruction above.

    But there's one more problem, because I have a certain format of my email notification that I send to the users. I normally use a compose action in Power Automate to store the HTML code of my email notification. Now that I have the HTML table in my PowerApps. How do I add it to the Automate flow which is triggered by the "Submit All" button? (like below screenshot)

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @NocturnalSec,

    Emm, the solution I provided is to achieve your need directly in Power Apps, which does not fit in the scenario where you use the "When an item is created" trigger.

    Further, you have mentioned that multi emails are sent at the same time using that flow, that's why I use the Office365Outlook.SendEmailV2() in Power Apps.

     

    To apply the HTML format, you just need to copy that html format to Power Apps and customize it in the HTML text box.

  • NocturnalSec Profile Picture
    18 on at

    I've decided not to use the "When an item is created" trigger and send the email from PowerApps using the html table as text input of PowerApps trigger in Automate flow.

    Tested and it worked perfectly.

    Thank you so much for your help! 🙂 

  • Alchemy Profile Picture
    44 on at

    This is fantastic Qi, exactly what I'd been looking for as well! Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard