Services Plugins FAQs

Vapi Assistant AI Pro - buildAssistantConfig re-runs on state change causing JSON parse error

Hi,
I’m using the Vapi Assistant AI Pro plugin (version 1.16.0) and running into a critical issue with the Transient Assistant JSON field.
The setup:

I have a page that receives a prospect record via URL parameter
On page load, a custom state (loaded_prospect) gets populated with data from the database
The Transient Assistant JSON field uses a Bubble conditional: when loaded_prospect is empty → show {}, when loaded_prospect is not empty → show the full prospect JSON with dynamic fields

The problem:
The plugin’s buildAssistantConfig function re-runs every time a Bubble state changes — including when loaded_prospect gets populated. This causes a SyntaxError at position 98 because the plugin is parsing the JSON during the transition between the {} state and the full JSON state.
The exact error:
SyntaxError: Expected ‘,’ or ‘}’ after property value in JSON at position 98 at JSON.parse at instance.buildAssistantConfig
What I need:
A way to pass dynamic Bubble expressions to the Transient Assistant JSON field that only gets evaluated at the moment the session starts — not every time a state changes. Is there a recommended approach for passing dynamic data to the plugin at session start time?
Thank you

Hi @luveli4444 ,

Thanks for reaching out on the forum as well!

We’ve actually just replied to your support email with a detailed breakdown and two recommended workarounds to handle how Bubble evaluates that dynamic JSON string mid-transition.

It would be awesome if we could stick to that email thread for this troubleshooting process. Keeping the conversation on a single channel makes it much easier for our team to follow up, review your setup steps, and ensure nothing gets missed.

Let’s continue over there - looking forward to your thoughts on the solutions we shared!

Best regards,
Support Team
Browse all Zeroqode Plugins for bubble
Banner_Last3