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 / Convert List to Datata...
Power Automate
Unanswered

Convert List to Datatable then email

(1) ShareShare
ReportReport
Posted on by 6
I hoping someone can help me. I'm fairly new to PAD and I'm struggling with a project for one of our customers. 
 
Here is what I have thus far for my Flow:
  • Set Variable - source folder
  • Set Variable - archive folder
  • Get Current Date/Time
  • Get Files in Folder
  • For Each Loop
    • Get files in folder
    • Read text from file
    • Parse text
    • Set Variable (email address)
    • Send email (using data from 2nd step in loop (Read text from file))
    • Move files to archive folder
    • Clear Get Files in Folder (1st step in loop)
Everything is fine except the column headers do not align with the column data. So, the table in the email looks unprofessional.
 
What I would like to know is what is the best way to format the 'table' so that the column header aligns with column data? I've tried splitting the text and then getting subtext, which works but, then figuring out how to re-assemble that into a table. It just iterates the first row over and over. 
 
I've seen a few things on this forum but, I haven't been able to replicate it successfully, so I'm asking for assistance. I'm open to any suggestion that would make my flow work and be efficient.
 
Any help would be appreciated. 
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    to get idea more around this- could you please share how data in text file looks like ?
     
    This would help in how to resolve the issue within converting to HTML format ?
     
     

     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • CrazyHarry Profile Picture
    6 on at
    Hey Nived,
     
    Here is how the data looks in the text file itself, for initial reference. 
     
     
    Here is how that same data looks in the email that is sent...
     
     
    Let me know if you need anything else. 
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    One way to do this - would be to read csv file and parse to convert to datatable, this may includes setting up the column seperator while reading csv file, i could see that each column is seperated by almost simmilar space (except headers), which can be used for splitting the text data columns,
     
     
     
    once converted to datatable- you can easily convert to HTML table format-https://community.powerplatform.com/galleries/gallery-posts/?postid=fd0b7fb4-5f5a-4453-aa26-d3becbdedea6
     
     
    Hope it helps !
     
  • CrazyHarry Profile Picture
    6 on at
    Nived,
     
    Unfortunately, this is not a csv file but rather a text file. 

    Below is a screen shot of the flow at the For Each loop section, the actions above that are merely declaring variables, getting date/time, etc. 
     
     
    The FileData variable within the Parse text action is pulling the data and storing it as a List of Text values, however, that is where misalignment occurs (see below).
     
     
     
    The table headers will always start at row 8 and it could be two rows of data (row 7-header info and row 8-check info) or it could be any number of rows (multiple checks). Is there a way to manipulate this data into a table? I was not able to successfully find a way. Keeping in mind I also need to account for the potential of the unknown quantity of rows (checks).
     
    Does that help you better understand the flow?  

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard