Custom Connector in PowerApps

In many cases, we may need to create custom connectors to consume our own API. In this blog, we will be discussing how to consume our own API (REST API) through a custom connector in PowerApps.

Already I created a custom connector that gets a parameter as username and returns user information as a JSON array.

Custom Connector

Test Custom Connector

Make sure to add Default response for each operation. Those fields only will be displayed as the outputs in designer. Otherwise we can’t get the property.

Add Default Response

  • Click “default” under the Response section under the Definition tab

Read Custom Connector

  • In my example, I have a button to invoke operation
  • OnSelect – UpdateContext({CustomData: ProcessAgent.GetAgent({name:”stalin@lti.onmicrosoft.com”}).value})

  • In this case
    • ProcessAgent – Custom Connector Name
    • GetAgent – Operation
    • name – Parameter
  • Save the result on the local variable “CustomData”
  • Read the result and display it in a single textbox or data table

View as a single text

We need to use the First function to get one value since the response is a JSON array.

Label text : First(CustomData).displayName

Display results in Data table

Items Property: CustomData

In this blog, we covered how to test the custom connector and consume it in PowerApps.

Thanks for Reading

Leave a Reply

Your email address will not be published.