PowerApps | Custom connector | Dynamic content missing

577 Views Asked by At

I have created a custom connector which I am adding in PowerApps and Power Automate. There is one action named "GetDetails" in custom connector to fetch details from an endpoint. Response from an endpoint is dynamic.
Sample response from end point:

{
    "data":  {
        //Some Dynamic Content 
    }
}

Swagger file response definition:

    get:
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              data: {type: object, description: data}      <---- Since dynamic properties in "data" at run time

Question:
Now when I use custom connector in Power Automate I get data property along with dynamic content. But when I use this custom connector in PowerApps I get empty data property. Dynamic content is missing.
Output in PowerApps

1

There are 1 best solutions below

1
SeaDude On

When you say "...when I use this custom connector in PowerApps...", how are you using it? Likely, you're creating a Collection using something like:

ClearCollect(
    colDetails,
    MY_CUSTOM_CONN.GetDetails(someParameter)
)

You can try adding a . to the ClearCollect statement to see if the schema needs another "level". This is known as "dot notation". Just adding a "." can be a big help for exploring the different schema levels.


EDIT 1

Hm. If you've tested the response and validated using Power Automate (or Postman, etc.), the only things I can think of are:

  1. Remove the JSON() function from your ClearCollect() statement.
  • The Custom Connector should already be returning JSON, there shouldn't be any reason (I can think of) to use transform it on the PowerApps side.
  1. If that doesn't work, "Rebuild" the Request in the Custom Connector.
  • Import from sample under Request
  • Enter the correct Verb, Headers and a sample JSON Body

enter image description here