#What are the available functions to interact with the typebot enviroment in the Script Block
1 messages · Page 1 of 1 (latest)
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by Baptiste. View answer.
There are 2 ways you can achieve this:
- Use a
Set variableblock with theMoment of the dayoption, and use that variable inside of yourScriptblock. (Easiest method) - Use a
Scriptblock to calculate the moment of the day in JavaScript directly. It's tedious and quite useless if you seek the same result as what returnsMoment of the dayinSet variable, but if you need something more custom, then this is the way. (Harder method)
What i was asking is if I can pull the moment of the day variable inside the script block, the equivalent of a 'getVariable' function in the script block, because there is no documentation about how to access System variables besides the set variable block
Mhm, I understood that, and if you first saved System variables like Moment of the day in a Typebot variable, you can access it in a Script block using {{variable_name}}