JSON Parsing OpenAI Issues

Hi Bubble community,
I’m still somewhat new to Bubble, but I’ve managed to create a small MVP. Part of that is i’m using OpenAI (via API) to summarise a bunch of impacts and create a change strategy. This all works, but what i need it to do is JSON parse it into different buckets.

I’ve tried for weeks now, and have looked at a bunch of posts in here too, but i just cant get it to work - and I’m losing my will to live!
Im at this point just aiming at getting 2 datafields filled “timeline_text” and “overview_text” but it doesnt work. Unsure what i can even show that’s beneficial, cause i dont know where the issue is.

Please help!

Hey @simonolsen89 :waving_hand:

Are you using OpenAI structured response? That is the first step to make sure the format is consistent. :blush: Then the next step for me would be to send the response to the backend workflow in Bubble using the API Connector so it automatically puts it into a clean response you can work with.

Does that help at all?

Might be something wrong with the JavaScript required to use the approach you’re implementing. Did you write that JavaScript yourself?

Hey give this a try, it should help!