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 Apps / Convert json from Flow...
Power Apps
Answered

Convert json from Flow to collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a Power Automate Flow that returns the following json:

 

[{'Item':'Document.docx'},{'Item':'Document1.docx'}]

 

In PowerApps I am trying to convert it to a collection.

Set(SearchRslts, PowerApp.Run());

ClearCollect(TestColl, SearchRslts.searchlist);

 

I then look at the TestColl and it just has one element, instead of two.  Any idea on what is wrong here?

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,201 Most Valuable Professional on at

    Two potential issues I see.  

     

    1) are you using Respond to Power Apps or HTTP response action?  If you are using Respond to Power Apps that is the problem.  It cannot return a JSON array.  It can only return an object with multiple properties.  You need to use the HTTP Response action to return an array.

    2) You should be creating the collection directly from the response, not storing it in a variable first.

    ClearCollect(TestColl, PowerApp.Run());
  • KS-04101812-0 Profile Picture
    Microsoft Employee on at

    I switched my Flow to return an HTTP response and then call ClearCollect(TestColl, PowerApp.Run()) and that still did not work.  What does the http response need to be.  Does it need to be a json object or json array.  Currently, I am returning 

     

    [{'Item':'Document.docx'},{'Item':'Document1.docx'}]

     

    from the flow.  Is that correct?

  • Verified answer
    Pstork1 Profile Picture
    69,201 Most Valuable Professional on at

    It needs to be a JSON array and you need to have the appropriate JSON schema loaded in the HTTP response action.

  • KS-04101812-0 Profile Picture
    Microsoft Employee on at

    I got it working.  The issue was I needed to change the json string to use double quotes instead of single quotes.

  • DH-27020923-0 Profile Picture
    on at

    How did you do this?

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 Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard