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 HTML table - Ba...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I'm working through a solution solution provided solved here

 

My goal is to create flow that looks at all open tasks in a planner and then creates an HTML email listing the tasks, for now, it's just planned to send to me. 

 

Here are the steps that I have mapped out in Flow:

 

1. Scheduled interval step

2. Initialise Array Var

3. Get list of Tasks from Planner

4. For each, check if they are not equal to 100 (so 100%)

4.1: Get the task details for the item.

4.2: Append to Array Variable (screen shot below)

Append-to-array.PNG

5. Stepping out of the loop (for each item) use output on "Create HTML Table" / Following error

6. Reference the output from the Create HTML table in Email to be sent. 

 

Running the flow gives me the following error. 

 

Create-HTML Table Error.PNG

I have tried many combinations of add/remove quotes. Adding compose elements to see output, but no luck. 

 

Any help from the community would be awesome. 

 

Thanks

Categories:
  • efialttes Profile Picture
    14,756 on at

    Hi!

    The error says, 'Create HTML table' expects an array of objects as input. Can you share a screenshot of your flow definition, to see which input you are currently using? IS it 'HtmlTable' variable?

    Thanx!

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    I think I've found the problem: the way you are creating objects in 'Append to Array' is not appropriate, i.e. you are actually creating strings. I get successful results by combining json() function and setProperty() function into an expression instead

    Let's assume for simplicity you just need Title in each object. IN such case, the expression you can use in your Append to Array is the following:

    setProperty(json('{}'),'Name',item()?['name'])

    Since you need more Properties, you can nest SEtProperty() like this:

     

    setProperty(setProperty(json('{}'),'NameOfYourFirstStringProperty','valueOfYourFirstStringProperty'),NameOfYourSecondIntProperty',valueOfYourSecondIntProperty))

     

    Hope this helps

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi 

     

    Thanks for supporting! I am using the HTMLTable as output. 

     

    I've added a screen shot below for more context.

    Flow-overview-create-table-of-opend-tasks.PNG

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    Llet's discuss about your flow. As I mentioned before, the problem imo is, that in your append to array variable, you are adding string structures, even though they look like objects. When this array is passed as input to "create HTML array" an error os shown due to this.

    Give me some minutes to record a video on how to add the expression I suggested in my previous post to your 'Append to array'.

    Hope this helps

  • efialttes Profile Picture
    14,756 on at

    Hi again

    Wait a second, I think there is a faster approach

    In your append to array, you already wrapped Title name with double quotes, but it looks like you forgot to wrap Title value with double quotes as I did in this example:

    Flow_wrap_doublequotes.png

     

    Since Title value is a string, you need the double quotes. If it were an integer, or an array you shall not add it.

    Please take a try, add this modification, reexecute your flow and tell as if it worked as expected

    Thanx!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks again for responding and supporting - much appreciated!

     

    I've run the flow once more with the suggested changes and it's coming back with the same error response as in my original post. 

     

    Attached is the flow, with quotes for the string dynamic value. Response_added-quotes.PNG

    When the flow is run, I see the output in the "Create HTML table" step...

    As you can see, there are three items in the planner that are being appended to the array. Curiously, it's presenting the new line characters (\n), but thinking this would not be a problem. Also for each line, it has wrapped quotation marks around the the "object"? "{.....}"

    Result-Response_added-quotes.PNG

    when inspecting the "append to array" steps, I see the following output. It appears to have encapsulated the strings, as you suggested.

    Response_added-quotes-iteration.PNG

    Hope this information is helpful. thanks!

  • efialttes Profile Picture
    14,756 on at

    Ooops! Let's implement the original plan, then: in the Append to Array variable remove current content and add the following expression:

    setProperty(json('{}'),'Name',item()?['title'])

     
     

    Save, run again and let's hope the problem will be solved

    IN some minutes I will share an test flow I am currently building

     

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    So this is my test flow that succeeded. Please note I use a dummy condition (please keep the one you are using) and also a dummy Select action block, I just added the property Name from the Dynamic SElector, when hovering with the mouse you can read the internal names used by the Planner Connector to identify each Task properties. So, I used this internal name in the expression

    Flow_append_to_array_objects.png

    Please note, in this context, items()?['Apply_to_each'] is the same as using item()

    Hope this helps

  • efialttes Profile Picture
    14,756 on at

    @Anonymous 

    Please remember

    Let's assume for simplicity we are just adding Title in each object. This is the reason the expression you can use in your Append to Array is the following:

    setProperty(json('{}'),'Name',item()?['title'])

    Remember you need more Properties, you can nest SetProperty() like this:

     

    setProperty(setProperty(json('{}'),'NameOfYourFirstStringProperty','valueOfYourFirstStringProperty'),NameOfYourSecondIntProperty',valueOfYourSecondIntProperty)

     

    Please also remember string properties values shall be wrapped inside single quotes, but I think both integer properties values and array properties values shall not.

     

    Hope this helps

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    @Anonymous 

    Please let us know if you finally manage to overcome your challenge, or you need extra help.

    REmember, if our last suggestions are successful, mark this topic as "Solved" by clicking "Accept as a solution". This way other community members facing this same problem in the future will have the chance to find a solution faster

    Flow_AcceptSolution.png

    Thanx for your kindness!

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard