Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Take CSV in Sharepoint folder and convert to table in body of email

(1) ShareShare
ReportReport
Posted on by 50

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:

JoeCrozier_0-1686679497385.png

 

and one looks like this and emails me the text thats in a .txt file, as part of the body of the email:

JoeCrozier_1-1686679575024.png

 

 

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:

JoeCrozier_2-1686679670959.png


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!




  • Verified answer
    Jcook Profile Picture
    7,779 Most Valuable Professional on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    @JoeCrozier A couple of things:

    What are you passing into the Parse Csv? You should be passing in the file content

    Jcook_0-1686857821239.png

     

    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.

     

  • JC-24071247-0 Profile Picture
    50 on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    Thank you for continuing to help!  So when I try it like this:

    JoeCrozier_1-1686852870411.png

     


    it errors like this:

    JoeCrozier_0-1686852839413.png


    When I have it in brackets instead:

    JoeCrozier_4-1686852979657.png

     

     

    Slightly different error:

    JoeCrozier_3-1686852955042.png

     

  • Jcook Profile Picture
    7,779 Most Valuable Professional on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    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.

     

    Snag_7dedf338.png

  • JC-24071247-0 Profile Picture
    50 on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    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):

    JoeCrozier_0-1686832775632.pngJoeCrozier_1-1686832829096.png

     

    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_2-1686832943700.png

     

  • Jcook Profile Picture
    7,779 Most Valuable Professional on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    @JoeCrozier  Can you show me the outputs of the flow?

  • JC-24071247-0 Profile Picture
    50 on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    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:

    JoeCrozier_0-1686685481901.png

    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?

     



  • JC-24071247-0 Profile Picture
    50 on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    Thank you.  As far as the parse csv from encodian, this is what pops up when i do that: 

    JoeCrozier_1-1686683621066.png

     

    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

  • Verified answer
    Jcook Profile Picture
    7,779 Most Valuable Professional on at
    Re: Take CSV in Sharepoint folder and convert to table in body of email

    Hello @JoeCrozier 

     

    Follow these steps:

    1. 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.

    2. Action: Get file content: Add this action to your flow and point it to the same library, and ID from the above trigger step.

    3. 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.

    4. 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.

    5. 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!

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492