https://discord.gg/botpress logo
Storage and analysis of questions asked by users.
# 🤝help
c
I'm working on adding a new feature to my chatbot: storing and analyzing the questions users ask. Currently, I have a table in Botpress called questionTable, which stores user questions in a column named questions using a specific action card called Insert Record. Now, I want to enhance this functionality with two main goals: 1. Log each unique user question in the questions column. If the same question has already been recorded, instead of duplicating it, I want to increment a counter that tracks how often that question is asked. 2. Add an additional column to the table (either a computed column or an equivalent dynamic solution in Botpress) to record the frequency of each question in an integer column called frequency. I would like some advice I don't know the best way to implement this feature. https://cdn.discordapp.com/attachments/1394833453907705967/1394833454167756840/3.png?ex=68783f62&is=6876ede2&hm=b9e1f34c61ccd9bac69ffb71f2e5b2493925c218705ee61666294863ee954cf2&
r
what you can do is when you take in the question as an input you can store it into a workflow variable then conduct a search by using find record card available and store the result as a boolean value in another variable then on the basis of the result you can simply increment the value in the frequency column of the said question further more you can create an autonomous node and interpret the said question and check if that is present in the table and perform the above too just keep an eye on AI spend
p
You can also do so via api calls in an execute code card using the tables API: https://botpress.com/docs/api-reference/tables-api/getting-started Happy Bot Building!
I will check it Leanne thank you
2 Views