T
Typebot4mo ago
bubusi

Cannot Access user Object Values Inside Chat Flow When Using Bubble Embed

Hi there, I’m embedding my chatbot using Typebot.initBubble() and passing a user object with name, email, and id. I can confirm via console logs that the object is passed, but I can’t access {{user.name}}, {{visitor.name}}, or even raw values like {{softr_user_full_name}} inside the chatbot. I’ve tried using Set variable blocks with “Execute on client” enabled, but no variables resolve. Can you confirm if user fields are accessible in chat flows for the bubble embed? If not, will support be added?
1 Reply
Baptiste
Baptiste4mo ago
There is no such thing as objects in variable in Typebot. You will have to forward the values directly like this:
Typebot.initBubble({
typebot: "my-typebot",
prefilledVariables: {
"User Name": user.name,
"Visitor Name": visitor.name,
},
});
Typebot.initBubble({
typebot: "my-typebot",
prefilledVariables: {
"User Name": user.name,
"Visitor Name": visitor.name,
},
});
Make sure you have both User Name and Visitor Name declared as variables in your bot flow and they will be prefilled with the object values 🙂 More info: https://docs.typebot.io/guides/utm-in-results#forward-utm-parameters-to-a-typebot

Did you find this page helpful?