Hello! I connected my API and the request was successful. How can I display the response? Magic text does not suggest anything that would allow me to do so. Here are some screenshots for reference:
Hi @speakupboy!Thank you for the video. I did watch that before. The example in the video is a GET method. I am using a POST. According to chatgpt, I need to parse the JSON response I get back to extract the answer and turn it into text that can then be displayed via custom actions.
The issue is that the returned response is not a key value pair. So the property being returned has no name. So in magic text, you can’t select the value, because it has no key to identify it by. It has no name.
You need a key of something like “result”
and the value of “result” is “What is your initial query?”
Hey @theadaloguy! Thank you for taking the time to reply. Now we are getting somewhere. That’s where most of my research led me. Do you think adding a custom JS script could do the trick?
The API itself needs to be returning the response in a key-value format. If not, you could use integromat, or Xano, to transform the response into a key-value pair, and call the API via one of those.
Thank you! I will try that and get back with the findings.
For example let’s say I called an API that returns a response with no key (and i’m not the creator of that API and therefore unable to change it).
I would set up a Xano endpoint, which then calls that API, and adds a key alongside the value.
So my Adalo custom action calls my Xano endpoint, which returns a result you can use.