Share feedback, ideas and get community help

Updated 8 months ago

Preffiled var stop to work.

At a glance
The community member is experiencing an issue where prefilled variables are not working in their Typebot flow. They have provided two test cases, one using a Node.js backend and another using a cURL request, where the prefilled variables are not being set correctly. A community member has provided a suggestion that the issue may be related to a "Group #1" that is emptying out all the variables, and they should remove it for the prefilling values to work properly. There is no explicitly marked answer in the post.
Useful resources
Hi, why prefilled variables doesn´t work anymore?
I have created my vars in the typebot flow.
First test:
In my node backend:
const ocontact: any = {
ticketId: '11',
name: 'test',
pushName: 'test',
number: '111',
};
const reqData = {
typebot: typebotSession.name,
prefilledVariables: ocontact,
};
const { data } = await axios.post(typebotSession.url, reqData);

And, no var is setted in the typebot flow.


Second test:
curl --request POST --url https://typebot.io/api/v1/typebots/teste-ticket-x2ubdn5/startChat --header 'Content-Type: application/json' --data '{
"prefilledVariables": {
"name": "Baptiste"
}
}'
{"sessionId":"clxrm1h1w013fg70wamgsa3eo","typebot":{"id":"clxrlelma003jhgag1x2ubdn5","theme":{},"settings":{"general":{"isBrandingEnabled":true,"isInputPrefillEnabled":true}}},"messages":[{"id":"b96c4dz8ldbhhez8o0d1ah5v","type":"text","content":{"type":"richText","richText":[{"type":"p","children":[{"text":"Seu numero é:"},{"type":"inline-variable","children":[]},{"text":" "}]},{"type":"p","children":[{"text":"Seu nome é: "},{"type":"inline-variable","children":[]}]},{"type":"p","children":[{"text":"Teste nome é: "},{"type":"inline-variable","children":[]}]},{"type":"p","children":[{"text":"Seu ticket é: "},{"type":"inline-variable","children":[]}]}]}}]}
Attachment
flow.png
B
L
2 comments
Group #1 empties out all your variables. You should remove it for the prefilling values to be properly prefilled
Add a reply
Sign up and join the conversation on Discord