Share feedback, ideas and get community help

Updated 3 months ago

Get data from a text

Hello everything is fine ? I have a question, I made a code, where it sends me all the customer data in the flow,
example: id":9051,"name":"teste ","number":"999999999","email":" ","","pushname":"test".
However, I'm trying to make a script to take this data and put it in variables, but I'm not succeeding, can someone more experienced help?
Attachment
typebots.PNG
D
.
3 comments
the fullticket variable is what is taking the data and throwing it into this text that I gave as an example, I am trying to make this script to take the data from the text and put it in variables, but it is not working
Is fullTicket created during the flow or is it generated alongside the client?

According to the documentation: "The setVariable function is only available in script executed on the server, so it won’t work if the Execute on client? is checked."

Considering that it is already a variable defined on the client side:
I would recommend using the following solution:

  • use a variable block to define fullTicket by checking to run on the client side
  • now use the script block running the setVariable on the server side.
Considering that it is already a variable defined during the flow, the only thing I would remove would be the first step I mentioned and remember to always use json parse, since the variables in typebot will always be converted to a text or a list of texts before the variable is saved in the database.

Example flow:
Add a reply
Sign up and join the conversation on Discord