JSON Raw response

Hello Bubblers,

Anyone can help on how to get JSON raw response for the current cell in repeating group?

example: after sending API call request, they respond with body data, I need this data to be formatted in JSON so i can send it back in another request as POST request.

Thank you,

Depending on how you want this set up you won’t need it to go through a RG.

Within your workflow you should be able to see the raw response of the API call step (when using as an action) which you can then pass to the next step.

Remembering you most likely want this process happening as a backend workflow for security.

thanks for replying,

I need to send back the response content to the API in order to validate the price, they are sending thousands of results, but need to send specific once which can be triggered by ID.

I really hope that I have explained enough

Ahh, so like, you’re getting a list of tickets and displaying that in a RG, then when a user clicks on just one cell in the RG you need to send a call to revalidate that price before you purchase it or?

yes you are right,
how this should be done by sending post request with the API response for this specific offer.

I hope its clear now

For this one you should be able to reference the current cells data and use it to format the new API call? What options are coming up when you select your data source?

Would you please explain here? sorry didn’t get

if I understood correctly, i am only able able reference the fields, basically I need the whole JSON response which already came from the API

Yep that’s the Json for the object being displayed in the cell. You could get the json which contains the whole array, if you select the repeating group it’s self, but wouldn’t you just want only the content from that cell?

Hi Khalid,

Correct me if i am wrong. This is my understand of what you want to accomplish:

  1. You run API call 1 which gets you a list of some items, you are able to display them in a RG.
  2. When a user selects just 1 of the item from this list, you wish to run API call 2.
    2.1 In this second call, you would like to extract the ID for this selected item, to send to this API call.

I have a few questions before i am able to suggest a solution.
What exactly do you need to extract from the original API response for the next API response?
Is it just an ID?
Is it more than 1 parameter?
Are you looking to extract a subset of the raw json response, instead of a specific key-value pair?

If it helps, we can connect over a quick call as well. Its easier to look at the editor instead of imagining the situation and back and forth.

1 Like

Thank you for replying, yes exactly, subset of raw Json response to be sent in another API call.

exactly, that’s what is needed.

Great, but that should be the raw text option from your earlier screenshot, what is the output from that?

the output is always empty,
i found this Enable “raw body text” for Request Data feature!

I am hoping to find some solution maybe in another way.

Hmm, annoying that its empty.

In that case just rebuild the structure you need, like “airlines”:“Currentcell's offer airlines”

then you can pass that though and should be all good?

Looks like that’s the only way to proceed, lets see if Bubble can fix that issue in the future.

@Oliver-wholegraintech thanks for your efforts.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.