web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create CSV Table or Cr...
Power Automate
Answered

Create CSV Table or Create HTML from SharePoint list, Person columns are JSON objects

(0) ShareShare
ReportReport
Posted on by 133

I want to build a flow that gets a list in SharePoint Online and generates a CSV file in a library.

 

It uses these actions: Create CSV Table and Select.

 

When viewing the results, the Text type columns from the list appear correctly, but the Person columns are treated as JSON objects and I have to figure out how to convert them to string / text.

 

There is a place in the Select action for adding an Expression, but I do not know which one will work.  Any ideas?

 

If you need screen shots to visualize, use this tutorial on creating CSV that I am following.

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @grahampasmurf,

     

    I am confused how you created the CSV file. Could you provide more details?

    I only know how to extract the corresponding data in the list and integrate them in an HTML table or CSV table.

    I did a test on my side, the field name is Person, the type is also Person, and  can only select a single user.

    45.PNG

    47.PNG

    If it is a Person type field, then Dynamic content will automatically separate the attributes.

    48.PNG

    If not, you can refer to the following method:

    Use "item()[ColumnName][‘propertiy’] directly to get the corresponding user's attribute value, like: item()['Person']['DisplayName']

    43.PNG

    Please take a try.

     

    Best Regards,

  • grahampasmurf Profile Picture
    133 on at

    I tried that and it did not work at first but I will try a few variations.

     

    I will add some screen shots and more detail later.

     

    Thank you.

  • grahampasmurf Profile Picture
    133 on at

    How did I create the CSV file?

     

    I used the "Create file" action and sent it the Output of the "Create CSV" action.

     

    Capture.PNG

     

     

  • grahampasmurf Profile Picture
    133 on at

    As for your first suggestion (that Dynamic content will automatically separate the attributes), that does work when I tested using a column that has 'Allow multiple selections' set to No.

     

    The problem is that the columns that I wanted all have 'Allow multiple selections' set to Yes, and with those columns I cannot get anything to work, even using your other suggestion.  If I try something like the expression

     

    item()?['Mgr']['DisplayName']

     

    I get the error,

    The template language expression 'item()['Mgr']['DisplayName']' cannot be evaluated because property 'DisplayName' cannot be selected. Array elements can only be selected using an integer index.

     

    Maybe my solution is to change all these columns so that the setting 'Allow multiple selections' is set to No.  I will do more testing on it.

     

    I also got a lot of weird results in my testing.  Sometimes there is a column that I can select but it fails, saying that the column is not available, even though it should be.  Not sure why.

  • Verified answer
    grahampasmurf Profile Picture
    133 on at

    Wait, I spoke too soon!  I got it working using this syntax:

     

    item()?['Mgr']?[0]?['DisplayName']

     

    Thank you, @v-bacao-msft

  • grahampasmurf Profile Picture
    133 on at

    Should I mark your reply as the Accepted Solution?  It was not the solution entirely, but it helped me get there.

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @grahampasmurf,

     

    You could consider marking your own post, after all, the final solution is your own.

    Your situation is related to "Allow multiple selection". If you set it to Yes, the return value will be an array.

    And you just entered only one Person, so you only need to get the element with index 0.

    If set to No, then the method I provide should be valid.

     

    Best Regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 495

#3
Vish WR Profile Picture

Vish WR 429

Last 30 days Overall leaderboard