Hello, I have several flows that are like "if a new file is saved in a folder, email me about it"
One looks like this and emails me a link to the file:
and one looks like this and emails me the text thats in a .txt file, as part of the body of the email:
Well now I'd like to do something very similar and when a .csv file is saved, I'd like to take the contents of the csv and put it into the body of the email as a table, like this:
I figure this is possible but I'm lost on how. When I google I keep getting the opposite flows: like "take csv from email and save to sharepoint list somewhere" or "take power bi and save as csv to email"
Would love any help!
@JoeCrozier A couple of things:
What are you passing into the Parse Csv? You should be passing in the file content
Could you share a sample output of the Parse CSV action?
Also, if your data has columns, you may need to specify this in the Parse Csv action.
Thank you for continuing to help! So when I try it like this:
it errors like this:
When I have it in brackets instead:
Slightly different error:
Hi @JoeCrozier
The issue seems to be the "Body" property of the "Parse CSV" brings back multiple data.
You want to only pass the "csvData" property from the Parse CSV action into your html table action.
Sorry it took me a day or so to respond, here's the outputs (assuming there's not a different/better view that you're looking for):
And here's the specifics of how I set it up. It seems like its 'getting' the csv data, but its putting the entirety of the data in 'one' column of a table.
@JoeCrozier Can you show me the outputs of the flow?
Sorry, one more question. (You can ignore my other message as I figured out the api key)
Got it to work, it emailed me, but by putting "body" in the create html table step, my email looks like this:
Where the stuff in CSVdata is all I really want, and all the other stuff is showing up. I tried changing the 'create html table' to point to the parsed csv data instead of "body" but then it errors out. Any ideas?
Thank you. As far as the parse csv from encodian, this is what pops up when i do that:
I have no idea what I would put in there. Api key? That doesn't seem right
Edit, you can ignore all this, I got an API key
Hello @JoeCrozier
Follow these steps:
Trigger: When a file is created (properties only): Set this as the trigger for your flow. Point it to your SharePoint library where the CSV files are being uploaded.
Action: Get file content: Add this action to your flow and point it to the same library, and ID from the above trigger step.
Action: Parse CSV: Use the Encodian Parse CSV - Parse CSV action to parse the contents of the CSV file. Point the Content field to File Content from the previous step.
Action: Create HTML Table: Add this action to create an HTML table from the parsed CSV data. In the From field, point it to Body from the Parse CSV step.
Action: Send an email: Use the Office 365 Outlook - Send an email action to send the email. In the body of the email, use the Output from the Create HTML table step.
This will convert your CSV file to a table in an email. Please let me know if you need further guidance!
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492