Has anyone successfully passed dynamic prompts using the Zeroqode OpenAI Full Plugin?

Hi Bubblers,

I’m working on a ChatGPT-style app where users can chat with AI models based on different categories (like Architecture, Medical, etc.). I’m using Option Sets to store category-specific prompt contexts and trying to send dynamic JSON to OpenAI using the Zeroqode OpenAI Full Plugin.

I’m building the (body) content as a stringified JSON array like this:

[
  { "role": "system", "content": "[Prompt Context from Option Set]" },
  { "role": "user", "content": "[User Message]" }
]

Even after formatting as JSON-safe, OpenAI doesn’t return any response .
Has anyone successfully passed a dynamic message list (with system + user roles) using this plugin? Or is the API Connector a better route for this use case?

Appreciate any tips, examples, or confirmation if this plugin has limitations with structured JSON input.

Thanks!

Hey @onwukweemeka ,
Thank you for contacting us.

At the moment, the OpenAI (Full) Plugin does not support sending dynamic structured JSON arrays (like role-based messages for ChatGPT) directly in the request body in the way you’re describing. We really appreciate you bringing this up — it’s a very relevant and valuable feature for building advanced AI chat interfaces.

We’ve already forwarded this idea to our development team for review and feasibility estimation. We’ll check internally if it’s possible to implement this functionality in a future plugin update.

Once we hear back from the devs, we’ll get back to you with a more concrete answer. Thank you again for your feedback and for helping us improve!

Best regards,
Zeroqode Team

Browse all Zeroqode Plugins for Bubble
Banner_Last3

1 Like

Thank you @ZeroqodeSupport My next question is that I want to be able to make the Ai chat to remember previous conversation and chat based on that.

Those the plugin support this functionality?

I chose to save chats into my database as a list of posts, attached to a conversation. I understand this duplicates data from openai but I wanted to save extra data and context, which was easier (for me) to store locally in bubble than to retrieve from openai.

your post makes me wonder if this was the most efficient way, as the conversations are all stored on openai too - but sharing my method in case it’s useful.

2 Likes

Hey @onwukweemeka ,
Thank you for your reply.

At the moment, the plugin does not natively support remembering previous conversations. However, we can enable this functionality under a specific condition:

:small_blue_diamond: You would need to store the conversation history for each user in your own database.
:small_blue_diamond: Then, on every new message sent to the AI, you would pass that stored history as a JSON object into the plugin action.

If you’re comfortable with this approach and able to manage the storage and formatting of the conversation history, we’d be happy to proceed with adding support for it.

Just let us know! :blush:

Best Regards,
Zeroqode Support Team

Browse all Zeroqode Plugins for Bubble
Banner_Last3

Hey-hey! :waving_hand:
Hope you are doing well.

:pushpin: What we found during testing
After extensive testing with Bubble and the Zeroqode OpenAI Full Plugin, we confirmed that manually structuring and sending a JSON message array (with roles like system, user, and assistant) can be very unreliable. This is mainly due to Bubble’s limitations when handling complex structured JSON and dynamic arrays.

Even when the JSON looks correct, Bubble may silently fail to send it properly, or the OpenAI API might not interpret it as expected.

:white_check_mark: Our recommended solution: Use OpenAI Assistants (built into the plugin)
Instead of manually formatting messages, we strongly recommend using the Assistant feature from OpenAI’s API, which is fully supported by the plugin. This approach is more stable and scalable for your use case.

Why Assistants are a better fit:

  • Persistent memory — conversations are stored automatically, no need to manage message arrays.
  • Built-in context handling — just set the Assistant’s instructions (e.g. “You are a medical expert.”).
  • Simplified logic — send only the user message; no need to manually switch roles or format messages.
  • Message history — you can retrieve the full conversation any time, already structured.

:repeat_button: Example: How It Works

  1. Create Assistant
    Set up an Assistant with specific instructions (e.g. “You are an architecture consultant”).
  2. Create Thread
    Think of it as a chat room — each category (Medical, Architecture, etc.) can have its own thread.
  3. Send User Message
    Simply send the user’s message as plain text to that thread.
  4. Create Run
    This connects the Assistant with the thread and launches the conversation.
  5. Poll for Completion
    Use “Retrieve Run” until the response is ready (status: completed).
  6. Get Messages
    Fetch the full conversation history — includes all roles, no formatting required.

:bullseye: The result?

  • No more JSON formatting headaches.
  • More natural multi-turn conversations.
  • Easier logic inside your Bubble app.

Would this solution work for your use case?
We’re happy to help you implement it — and if this approach sounds good to you, we can go ahead and update the plugin with this idea.

Best Regards,
Zeroqode Support Team

Browse all Zeroqode Plugins for Bubble
Banner_Last3

Always use API Connector for API calls, no need for a plugin here.

You need a conversation data type and a messages data type. All messages belong to a conversation. Each message has content, a user field for the user that sent it if there is one, and a role which is the option set which is either system, assistant, or user.

Then, when you want to pass the messages to the OpenAI API call, you do a search for messages sorted by date sent and format as text to format the JSON for each message with the role and the content.

Hey @georgecollier ,

Thank you so much for your helpful answer and for supporting the user! :raising_hands:

Active and knowledgeable community members like you are truly valued in the Bubble community — your insights make a big difference in helping others find solutions quickly and build better projects. We really appreciate your contribution! :blue_heart:

If you’ve used any of our Zeroqode plugins, we’d be grateful if you could leave a positive review on the plugin page. It really helps us continue improving and supports the whole community.

Thanks again for being awesome! :blush:

Best Regards,
Zeroqode Support Team

Browse all Zeroqode Plugins for Bubble
Banner_Last3

1 Like