Retaining the openai messages

We are building an internal tool for us to create ebook lead gen products for our clients. We can do this on ChatGPT but its quite a long process so thinking of an interface to do this on bubble.
Can we retain the openai message so the user can continue on and then save the output to the DB? Essentially, we want to ask the ai to create the sections, then build the sections which are then saved to the db and pulled together.


Have a conversation data type, and message data type. Message data type contains the message, who sent it (option set of user/ system/assistant), and the relevant conversation and user.

It is not possible without saving data to DB. If you implement this using “Set State”, it will not stay when the page is refreshed. The “State” won’t persist.

By the way, you’ll need to get ChatGPT to output in structured JSON to reliably create the sections using either the Bulk Create API or schedule API workflow on list.