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 Automate / Creating an HTML table...
Power Automate
Answered

Creating an HTML table, for a selected row as trigger

(1) ShareShare
ReportReport
Posted on by 28

So, I am trying to create a flow for a selected row in excel, an HTML table should be created which then I will add in my email body to be sent as an email. But, I can't seem to figure out how to get an array value out of the trigger "For a selected row". 

Because when I add the action "Create HTML table" it requires an array input in 'from' property value. And it gives me an error message "The 'from property value in the table' action inputs is of type 'String'. The value must be of type Array".

This happens when I add 'Create HTML table' action right after the 'For a selected row' trigger or even when I add compose action and the 'Create HTML table' action.

 

Are there any other actions that I can add to convert the dynamic content from 'For a selected row' to an array, so that I can use it as input in create a HTML table. I have tried using square brackets in compose but still it says String.

 

I would really appreciate if anyone can guide me towards the right path here. 😥

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    Try the below method

     

    image.png

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    For the above Send Email action step to place the action step click the Body the last symbol </> (Code View) to place the compose HTML step.

     

    image.png

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    Not sure if you want to email the HTML table. So if you really want to create the array and use the HTML table try the below

     

    image.png

     

    Above you are constructing an array of JSON values so that you can pass this to Create HTML Table.

     

    Thanks

  • Indrajeet_Raj Profile Picture
    28 on at

    Thank you so much for all these suggestions!! I will try these the first thing tomorrow morning when I login to my work PC and I'll report back!

    Also, I don't know if that is possible or not I also wanted to add a second table but with conditions of the row values not being blank (maybe with filter array?..). Basically the idea is, each row corresponds to an audit of an employee with columns A to H are all employee, their team leader and their manager details and columns I to CA are all the audit parameters and failures.

     

    So, in an audit if we find any failure in the audit parameter the corresponding value in the cell will be Yes and it's comments in the next cell, and if no failure identified then the cell value is blank & comments also blank. Whenever we have a failure identified in an audit an email needs to be sent to the employees team leader and manager with the failures and comments in the email body. I am trying to automate the sending of the email process, hence the need to ignore blanks and to only include cell values with a "Yes" and some comments.

     

    Really appreciate all your help!! 😇

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    Thanks for your quick reply. Yes you can use the Filter Array Step and pass the constructed custom array JSON. Let me know how it goes.

     

    Thanks

  • Indrajeet_Raj Profile Picture
    28 on at

    Hi @abm

    I was able to construct a JSON array and pass it through create HTML table and add it to my email body. Is there a way I can edit the table formatting because the table shows up in the email body without any borders. Which action should I add after create HTML table to format it either with css or html. 

     

    Again, thank you so much for helping me with this. 

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    Thanks for your reply.

     

    Yes that's correct. It won't give you any styling. 

     

    There is an excellent article from Ryan which will save some of my time explaining how to style HTML tables in Power Automate 😀

     

    Here is the link

     

    Power Automate HTML Table Styling – Ryan Maclean (ryanmaclean365.com)

     

    If you need any further help please let me know.

     

    Thanks

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Indrajeet_Raj 

     

    How you progressing? Do you need further help in this? 

     

    If your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

     

    Thanks

  • Indrajeet_Raj Profile Picture
    28 on at

    Hi @abm

    I have now formatted my table as per my liking with css style formatting, now adding another table to the email which I will filter to remove blank values and add it in the same email body. 

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard