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 :

Convert any Datatable to a beautified HTML table in Power Automate Desktop using GPT

VJR Profile Picture Posted by VJR 7,635

 

  1. At first the Desktop Flow will transform your Datatable to a HTML table by dynamically reading all the column headers and column values.
  2. Then call GPT by giving your own formatting instructions

I have used the below example:

 

Please provide a CSS for the below.

  • table header as dark blue
  • every alternate row as light gray
  • Font as verdana
  • text align to center
  • border 2px
  • width as 80%

 

  1. GPT will respond with a CSS
  2. Append this CSS variable to the HTML variable of Step 1
  3. That’s all: Your Datatable is now a formatted html table.

Use this formatted html table in your Outlook emails or anywhere you would like to.

 

Thumbnail.png

 

  • Refer above input and output images of different samples
  • Does not require your data to be sent to GPT
  • All of this, shown in a Desktop Flow attached to this page

 

  • How to use GPT in Power Automate Desktop?

Integrating ChatGPT with Power Automate Desktop - Power Platform Community (microsoft.com)

 

NOTE: In lieu of calling the Open AI GPT, you can also use the new in-built GPT action called ‘Create text with GPT on Azure OpenAI Service’ shown here AI Builder actions reference (preview) - Power Automate | Microsoft Learn

 

 

  • Refer the Comments in the Flow and follow the instructions accordingly.
  • Attached Desktop Flow was built on PAD Version 2.33

 

Categories:

AI Builder topics Desktop flows

Comments

  • Multiselect Profile Picture Multiselect 6
    Posted at
    Convert any Datatable to a beautified HTML table in Power Automate Desktop using GPT

    @VJR Another question, suppose I want to make a value clickable. So that it is a hyperlink. How can I do that in PAD?
    For instance the text in the row is "Yes, more info is known". To see that info, you can click on it and it takes you to the destination website.

    Is there a possibility in PAD to do it?

  • Multiselect Profile Picture Multiselect 6
    Posted at
    Convert any Datatable to a beautified HTML table in Power Automate Desktop using GPT

    @VJR thanks again, this works great as well!

  • VJR Profile Picture VJR 7,635
    Posted at
    Convert any Datatable to a beautified HTML table in Power Automate Desktop using GPT

    Hi @Multiselect 

    You're welcome. I am assuming you are asking about adding picture column to the html table and not to the Datatable as Datatable does not have an image datatype column.

     

    Here it is how it is done for the html table.

    - Let's say this is your html code as shown here - https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table3

    - To the <tr> tag add one more table header <th>  (marked in bold)

    <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
    <th>Picture</th>
    </tr>

     

    - Then in the table data tag <td> use the image tab (marked in bold)

    <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
    <td><img src="https://cdn1.iconfinder.com/data/icons/bokbokstars-121-classic-stock-icons-1/512/person-man.png" alt="Girl in a jacket" width="50" height="60"></td>
    </tr>

     

    - This is how the table looks after adding the code as mentioned above

     

    VJR_0-1693651418679.png

     

     

    - If you want the profile picture above the table then simply use the <img> tag before the html the <table> tag starts.

     

     

  • Multiselect Profile Picture Multiselect 6
    Posted at
    Convert any Datatable to a beautified HTML table in Power Automate Desktop using GPT

    @VJR thank you very much! I have a question, suppose i want to add an extra column with a profile picture or something of the like how can I add that in the table or above the table?