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 Automate / Sharepoint List to Htm...
Power Automate
Answered

Sharepoint List to Html Table in Send email

(0) ShareShare
ReportReport
Posted on by 43

Hello, 

 

can anybody tell me what is to correct way to parse a SHP List with 20+ colls in a way that only selected collumns are outputted to a html table in a send mail action. I want to create a flow that runs daily to send summary emails (and no, SHP alerts are not a acceptable workaround 😞 also It needs to be in one email only).

 

Rant: Shouldnt this be trivial? I have spent more than 3hours trying to piece this together 😞 unfortunately I am unable to find reference for Data operations Actions (can anyone please point me to the right direction, I would doubly appreciate if it had ms flow ready examples) /endrant

 

I have tried multiple combinations, the one that makes the most sense:


er.png

Thanks

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

    Hi @avt,

     

    Have you checked the Create HTML table Action?

    A better way is use the Create HTML table Action to build the table, if you only need to send the HTML body to yourself, then choose the Send me Email Notification action, if others would be involved, change it to the Send an Email Action.

    For Send an Email Action, make sure the Is HTML is set to Yes under Advanced options.

    20.PNG

    21.PNG

    If you need any further help on this, please post back.

    Regards,

    Michael

  • avt Profile Picture
    43 on at

    Thank you, but as I said I need only selected collums not all of them because the list has 20+ colls and the formating is terrible with more than ten.

     

    I can select the wanted collumns with the Compose Action in Aplly to each container but cannot merge them into a single table after that with Join Action.

     

    Funny enough the Join Action works ok If I skip the Compose Action but than once again I am stuck with all the inwanted collums, is this a bug? (The invalid template error in screenshot in my first post)

  • Verified answer
    Parraloco Profile Picture
    19 on at

    Use the Select action from Data Operations. Below is part of a flow that emails me my active (that's what the filter is for) planner tasks.

     

    Send Task List.png

  • avt Profile Picture
    43 on at

    Thank you, it worked, its perfect, you saved my day 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I just built this exact example flow with a few more conditions, trying to figure out in the above if I wanted to compose the due date into a nicer looking format, how I could pull that off for each table entry.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

     Nevermind, I dfigured this out. Instead of having it compase seperately, I added the following directly into the table:

    @formatdatetime(item()?['dueDateTime'],'MM/dd/yyyy')

     

    works nicely as long as there is a due date attached, working on a conditional statement now for when it is empty, still not working quite right.

     

  • Parraloco Profile Picture
    19 on at

    Try this. It shows N/A if there's no due date. You need the second coalesce() since the false option is still evaluated in the if function.

     

    @if(equals('01/01/2000',formatDateTime(coalesce(item()?['dueDateTime'],'2000-01-01T00:01:00Z'),'dd/MM/yyyy')),'N/A',formatDateTime(coalesce(item()?['dueDateTime'],'2000-01-01T00:01:00Z'),'dd/MM/yyyy'))

  • geotech Profile Picture
    18 on at

    @Anonymous

     

    I am writing rows from an Excel spreadsheet to a HTML table that will be sent via email. I understand you were able to modify the format of the date by directly entering the format code into the table? I'm not sure I know how to do this - could you take a look at my current flow and help me determine where to place the format code (I currently have it in the Compose action which is not working)? Thanks in advance

     

     

    EmailFlow.png 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

    I wrote the code directly into the box on the 'Select' area:

    @if(equals('01/01/2000',formatDateTime(coalesce(item()?['dueDateTime'],'2000-01-01T00:01:00Z'),'MM/dd/yyyy')),'Not Set',formatDateTime(coalesce(item()?['dueDateTime'],'2000-01-01T00:01:00Z'),'MM/dd/yyyy'))

     

    I made it conditional, as in my case I was pulling a date from a Task due date, which may or may not be assigned.

     

    Hit the x to remove the variable below in the field you want to compose the date, and insert your code directly into the table on the 'Select' area. Eliminate the compose completely.

     

     

  • geotech Profile Picture
    18 on at

    @Anonymous,

     

    Thank you for your quick reply. I attempted to insert the format line into the Select action, but my results are unexpected. I'm assuming I need to adjust the format line so that the format line is read as a function as opposed to text. Do you know if I need to tweak the format line so that it works properly?

     

    Here's my Select action:

    Select.PNG

     

    And here's an example from the output:

     

     

     

     

     

    Output.PNG

    Output table.PNG

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard