Get raw JSON with Raw Body Text: attribute is empty

I am getting data from an API call. The data is an array of objects that looks something like this.

{"articles": [
    {"url": "https://www.web.com/url1", "title": "The title of the URL"},
    {"url": "https://www.web.com/url2", "title": "The title of the URL"}
]}

I now want to send this data back with a PUT API request. To construct the JSON object, I put the data in a RichTextInput to validate it, like this:

Screenshot from 2022-10-27 11-00-11

As you can see, the Raw Body Text attribute (which sounds like exactly what I need to construct this JSON) is used.

However, this is how the RichTextInput evaluates:

Screenshot from 2022-10-27 11-01-18

I have followed the advice of this post to enable “Include errors in response and allow workflow actions to continue” in my API call, but this has not resolved the problem.

Could someone please advise on how to resolve this - or if you have some other way to retrieve the raw JSON for an array of objects, so that they can be forwarded to a third party API service? It appears to me to be a bug with the Raw Body Text feature.

Thank you!

1 Like

Hi Willem. I made a bug report and the team are working on it, but I’m not aware of a fix yet.

I worked around this by restructuring my API schemas (which I’m in control of). In general, I advise you don’t rely on JSON “raw body text” as a concept in Bubble until they announce a fix.

hi there,
I am having similar issue. Issuing a PUT API connector request with JSON body defined as string does not work. It seems that no data is passed when the external API call is made.
Any update from bubble.io’s team will be great!

just after I posted my message, I decided to use the RAW option. This worked for me!
I followed Row api connector dynamic value for the exact syntax and I managed to get the PUT call right.

1 Like

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