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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to get a table in Power Apps from Power Automate?

(0) ShareShare
ReportReport
Posted on by 2,291

Hi,

 

I'm sending two values from Power Apps to Power Automate. These are being used to filter a Dataverse table I want to get back into Power Apps as a collection.

 

So this is my flow:

WebPortal_0-1700420309030.png

I'm afraid I can't go back to the old designer, but these are the details:

WebPortal_1-1700420341779.png

 

 

WebPortal_2-1700420367242.png

 

WebPortal_3-1700420383163.png

 

Back in Power Apps, I have button wiht the OnSelect property:

 

Set(myVar, MyFlow.Run(5, 6).resposta

 

So, upon clicking the button, I see the result of the variable is:

 

WebPortal_4-1700420492189.png

 

"Text Error: ConstraintViolated"

 

I simply want to get the JSON back into Power Apps.

I have the same question (0)
  • Pstork1 Profile Picture
    68,295 Most Valuable Professional on at
    Re: How to get a table in Power Apps from Power Automate?

    There are two issues with the way you are doing it. 

    1) Respond to Power Apps action can't send back an array.  It can only send back a string.  To send back an array you need to use the HTTP Response action and provide an appropriate Schema in the advanced settings.

    2) If you are sending back an array then you want to capture the array as a collection using ClearCollect() instead of Set()

  • WebPortal Profile Picture
    2,291 on at
    Re: How to get a table in Power Apps from Power Automate?

    @Pstork1 

    As always, I value your insight!

    I've tried the HTTP Response, before the "Respond to Power Apps" action, but I struggle with the schema.

    This is a dataverse table, what kind of schema should be passed?

  • Pstork1 Profile Picture
    68,295 Most Valuable Professional on at
    Re: How to get a table in Power Apps from Power Automate?

    Use the HTTP response in place of the respond to Power apps.  For the Schema, just grab the output you are returning from the table from a previous run and paste it into the Generate from Sample button under advanced Settings. Its the same process as using a Parse JSON.

  • WebPortal Profile Picture
    2,291 on at
    Re: How to get a table in Power Apps from Power Automate?

    I have been pulling the (rest of) my hair in order to get the schema right....

     

    I've tried copying everything within the "value", like this:

     

    [
          {
            "@odata.type": "#Microsoft.Dynamics.CRM.cre05_results_joa_api",
            "@odata.etag": "W/\"11809741\"",
            "@odata.editLink": "cre05_results_ja_apis(1e3989da-9d85-ee11-8179-000d3a655712)",
            "statecode@OData.Community.Display.V1.FormattedValue": "Ativo",
            "statecode": 0,
            "statuscode@OData.Community.Display.V1.FormattedValue": "Ativo",
            "statuscode": 1,
    ....
    }
    ]
     
    But I get the error:
     
    The input parameter(s) of operation 'Response' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Response'.
     
    Then what am I supposed to enter here????
     
    I never get it...
  • WebPortal Profile Picture
    2,291 on at
    Re: How to get a table in Power Apps from Power Automate?

    And these are the input parameter:

     

    WebPortal_1-1700425865615.png

     

  • Pstork1 Profile Picture
    68,295 Most Valuable Professional on at
    Re: How to get a table in Power Apps from Power Automate?

    Are you pasting that into the panel that opens when you click on the generate Sample Schema link?

    First click on Show all

    image.png

    Then click on the Use Sample Payload to generate schema link.  That will open a panel. Paste the sample in the panel and click Done. That will generate the schema for you.

    image.png

  • WebPortal Profile Picture
    2,291 on at
    Re: How to get a table in Power Apps from Power Automate?

    Yes, that's exactly what I'm doing:

    WebPortal_0-1700426499500.png

     

  • Verified answer
    Pstork1 Profile Picture
    68,295 Most Valuable Professional on at
    Re: How to get a table in Power Apps from Power Automate?

    It looks like you are pasting it directly into the schema rather than the dialog that opens up when you click on the Generate Sample link.  Take a closer look at my second screenshot. I highlighted the link you have to click on to get the dialog to open. That is where you paste the sample to generate the schema.

  • WebPortal Profile Picture
    2,291 on at
    Re: How to get a table in Power Apps from Power Automate?

    LOL, that's exactly the case 🙂

    Thank you!

  • grantjenkins Profile Picture
    11,059 Moderator on at
    Re: How to get a table in Power Apps from Power Automate?

    Just curious - is there a reason you are running Power Automate to filter a Dataverse table and return the data? Why not just add a connection to the Dataverse table in your Power App and use a Filter on the table to show the results you're after. This would return the results quicker, and overall more efficient (will run the Filter delegated) and no need for a Power Automate.

     

    As an example, when I select an item in my Gallery it resets my collection including a filtered set of results and certain columns that I want in my collection. 'Product Catalog' is my data source.

     

    ClearCollect(colItems, ShowColumns(Filter('Product Catalog', 'Product Type' = Gallery2.Selected.Value), "crcb7_title", "crcb7_codename", "crcb7_productcategory"))

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard