Return data from API - Format Content as Text should convert to JSON, right?

In the above screenshot, invoiceLines, sows and clients all return valid JSON because the workflow is natively converting the data types to JSON objects.

However, for “internalAccounts”, since I need attributes on option sets passing through, I needed to use the format content as text on a list of option set values to get the result I needed.

this works perfectly - EXCEPT - the value of internalAccounts is a string, not JSON in the returned api value. Bubble escapes all my JSON to return it as one big string instead of an array of objects as I built using the “Format content as text” format above.

Any ideas? I really don’t want to have to find everywhere I touch this option set and convert it to looking at a data type instead just for this one little issue.

That’s because the value of internalAccounts is a string and not JSON. It is a string in a JSON-friendly format, but a string nonetheless.

This seems to be a limitation of this return data from API action - you can’t have nested JSONs.

Just digging this thread back up, seems a bit silly that there isn’t a method to nest when defining the return in JSON, we need a checkbox to ‘remove quotes’ or ‘nest output’. Otherwise it means leaning on using the Other content-type just to get around this and build out the whole response manually.


1 Like

You can use custom content-type, it will require separate api call to get options.

1 Like