#Can typebot read from results table?

1 messages · Page 1 of 1 (latest)

true pulsar
#

is it possible to initialize a value from a field in a record of the results table?

stable herald
#

Someone will reply to you shortly. In the meantime, this might help:

lunar turret
#

I don’t understand the question, more context? 🙂

true pulsar
#

@lunar turret
For example, I store the count of registered users in a variable called num_registrations. Since all variables in the flow are scoped to individual chat sessions, we need a way to initialize the num_registrations variable with the existing value from the results table. Simply initializing it with 0 at the start of each session will reset it every time a new chat session begins. Instead, we want this variable to retain its global value across all sessions and increment it as users register during their individual chat sessions.

I believe in he Set Variable Node, we can have a query builder to select data from the result. (We can use an external db of course and use http requests, but I was wondering if it can be done just using the Results).

lunar turret
#

Oh ok I see.

#

Unfortunately you can't keep track of a global variable on a typebot like this.

#

You could maybe do it with HTTP requests that queries the Typebot API!

#

With param limit set to 1 to only get the latest result