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 - The...
Power Automate
Answered

Create CSV table - The property 'columns' must be specified unless the 'from' property value is an array of objects.

(0) ShareShare
ReportReport
Posted on by 216

This is a follow-up to an earlier post of mine Re: Create CSV table input limited - Power Platform Community (microsoft.com).

 

I basically need to create a CSV table from an array. I used 'Append to string variable' within a loop, then convert this variable to a compose outside of the loop, then this is wrapped in a json expression when creating the table.

 

My first attempt ran successfully but it only brought across the outputs from the first loop. I figured that it was because the arrays had the characters ][ in between, so I have another compose which replaces the characters with a comma:

replace(outputs('Compose_2'),'][', ',')

 

However, I now get this error on the Create CSV table: The property 'columns' must be specified unless the 'from' property value is an array of objects.

I guess the code is no longer recognised as an array of objects, but I can't see how.

 

The code begins with "[{ and ends with }]". I tried removing the " but this also didn't work. Is there anything else I could try?

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @CAlvy 

     

    Could you pls share the output of compose action with sample data from which you want to create a csv table?

     

     

  • CAlvy Profile Picture
    216 on at

    Hi @ManishSolanki 

    Sure:

    [{\"FileName\":\"name\",\"Link\":\"link",\"Path\":\"path",\"ModifiedBy\":\"modifiedname\",\"ModifiedDate\":\"modifieddate\",\"Site\":\"siteurl"},{\"FileName\":\"name\",\"Link\":\"link",\"Path\":\"path",\"ModifiedBy\":\"modifiedname\",\"ModifiedDate\":\"modifieddate\",\"Site\":\"siteurl"}]

     

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @CAlvy 

     

    Thanks for sharing the details.

     

    Here is the sample flow.

     

    I have stored the sample data in the compose action:

    ManishSolanki_0-1706783461913.png

    [{\"FileName\":\"name\",\"Link\":\"link",\"Path\":\"path",\"ModifiedBy\":\"modifiedname\",\"ModifiedDate\":\"modifieddate\",\"Site\":\"siteurl"},{\"FileName\":\"name\",\"Link\":\"link",\"Path\":\"path",\"ModifiedBy\":\"modifiedname\",\"ModifiedDate\":\"modifieddate\",\"Site\":\"siteurl"}]

     

    Next, add "Create CSV table" action to create csv table from the output of compose action. We would use expression to convert the string in compose action as an array object. Expression needs to be entered in the expression box as shown below:

    ManishSolanki_1-1706783616823.png

    json(replace(outputs('Compose'),'\',''))

     

     

    Output:

    ManishSolanki_2-1706783675423.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • CAlvy Profile Picture
    216 on at

    Thank you. This has removed all the \ but unfortunately I'm still getting the same error message.

    Inputs from Create CSV table now begin with:

    {
    "from": [
    {
    "FileName":

     and end with:

     }
     ],
     "format": "Csv"
    }

     

    This is the same format as when the flow succeeded, so I can't see where it could be going wrong.

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @CAlvy 

     

    Pls try below expression in "From" parameter of "Create CSV table":

    json(replace(outputs('Compose'),'\',''))?['from']

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • CAlvy Profile Picture
    216 on at

    Unfortunately I now get this error:

    InvalidTemplate

    Unable to process template language expressions in action 'Create_CSV_table' inputs at line '0' and column '0': 'The template language expression 'json(replace(outputs('Compose_1'),'\',''))?['from'] ' cannot be evaluated because property 'from' cannot be selected. Array elements can only be selected using an integer index. 
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @CAlvy 

     

    Could you pls share the screenshot(s) of create csv table action in edit mode? Also share the value of "From" input parameter in previous run instance.

     

  • Verified answer
    CAlvy Profile Picture
    216 on at

    I've worked out what the problem was. In the apply to each, I was pulling off all libraries for that SharePoint site but sometimes there was no content in the library so I had blank arrays. My Replace was then turning these into an extra comma. I've updated all my Replace expressions to account for these and it's running fine now. Thanks for your suggestions though!

     

    For reference, I now use these expressions before creating the CSV table

    replace(outputs('Compose_all_files'),'}][{', '},{')
    
    replace(outputs('Compose_replace_arrays'),'}][][{', '},{')
    
    replace(outputs('Compose_replace_empty_arrays'), '[]', '')

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard