Passing API call response to Converse API

I’ve created a new API call node in the flow editor and I am able to display response as a text through Converse API. The problem is that I have a custom frontend and I woud like to pass that JSON response to my frontend through Converse API and display it using my own formatting. Seems like a pretty common scenario, but currently it seems that Converse API only supports type:text and I can’t send anything else. Is there any way to send json response instead of text? I’ve tried to send json within text, but it gets converted to text. Maybe by using a custom action or altering the Converse API itself? Seems like a really basic feature to be able to send custom data to Converse API but somehow this hasn’t been implemented. Any advice would be greatly appreciated.

Hey @reactone

One way to hack around this would be to include some marker in your text response indicating that the rest of the message is a JSON response, e.g. "===JSON=== “{“key”:“value”}” "

Thanks for your help @spgin, I guess that wouldnt work because you cant pass raw json as a text. It will render it as Object Object. But I found a way to do this by assigning json response to temp and then outputing it in the text content type.