cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Handling JSON POST response from Custom Connector

Hi all,

 

Currently experimenting with utilising custom connectors to other APIs from PowerApps. In this scenario, I'm trying to connect to Google's QPX Express API to search for flights between cities. The endpoint i'm accessing utilises a POST, with params such as destination and home city passed in the body. It should return a variety of search results.

 

I have been able to succesfully set up the custom connector in PowerApps and can test it succesfully there.

 

This is the request set up under the "Test" section:

powerapps-customConnectors-1.PNG

 

And here is the response:

powerapps-customConnectors-2.PNG

 

However, when I go to use this connector I don't seem to receive any response. I have tried to collect the results in powerapps with the following. In both cases, the collection and context variable I'm trying to piece together as the response both end up empty:

powerapps-customConnectors-3.PNGpowerapps-customConnectors-4.PNG

 

I had a read of some threads and a play with the "Response" of the custom connector but the same issue is still occuring. This is what the response is set up as in the custom connector. I got this automatically from copying and pasting the sample response header and body I got from the "Test" above:

powerapps-customConnectors-5.PNG

 

 

Any ideas where I might be going wrong?

9 REPLIES 9
Community Support Team
Community Support Team

Re: Handling JSON POST response from Custom Connector

Hi @rolycityaccount,

 

Could you please take a try to add a gallery and then put the function there?

Take a try with the QPXExpress.searchflights(string).Body (or response) under the items property of the gallery.

It may not be the body parameter, add a dot after the QPXExpress.searchflights(string), and check to see if there are any dynamic content displayed.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Handling JSON POST response from Custom Connector

Hi @v-micsh-msft

 

Tried that initially but doesn't appear to be any dynamic content built from the command, which is why I then tried to just collect the lot / turn it into a context variable. I tried .key, etc (all of the properties displayed on the Response body screenshot above) and also can't get anything back.

 

I am guessing a bit here, but If I'm not mistaken, the response comes back from QPX, then is interpreted by the custom connector, and then back to Powerapps right? If testing the custom connector works fine, but Powerapps doesn't get anything back, I would think that there is an issue somewhere between sending the response back from the custom connector, and powerapps' interpretation of it?

rjpower
Level: Powered On

Re: Handling JSON POST response from Custom Connector

Hi @rolycityaccount@v-micsh-msft

 

Did you find any solution for this issue? I have the same issue - Always the response is empty in PowerApps. Any help - I would really appreciate it. Thanks,

Re: Handling JSON POST response from Custom Connector

Unfortunately not. After quite some time tinkering we ended up abandoning this functionality haha

Richard2000
Level: Powered On

Re: Handling JSON POST response from Custom Connector

I have the same issue and thought it may relate to how the connector parse the JSON arrary. I can't figure out how to display the response. Any update on the issue?

Anonymous
Not applicable

Re: Handling JSON POST response from Custom Connector

Is there still no solution to this? This was actually the first thing I tested in PowerApps for a customer and its quite disappointing to have such basic capability not working...

DDharmawan
Level: Powered On

Re: Handling JSON POST response from Custom Connector

just a random idea, Have you guys tried to parse the JSON result with microsoft flow and give the data back to powerapps?

Re: Handling JSON POST response from Custom Connector

Same here. I've checked using Flow which can get response from my custom connector and has no problem with using output values.

But in PowerApps values from response are not fetched.

This is still an issue and should have to be resolved if we thinks seriously PowerApps + CustomConnector.

seadude
Level 10

Re: Handling JSON POST response from Custom Connector

Hi @rolycityaccount. Maybe instead of setting the response as a variable in PowerApps, try to ClearCollect() the results instead.

Example:

ClearCollect(
    colAPIResponse,
          customConnector.Action(value1, value2, etc)
)

This is how I grab responses. Good luck!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 189 members 4,534 guests
Please welcome our newest community members: