Where to find more about default botpress variable...
# 🤝help
e
Thanks for reading my question! I forgot where I got this snippet of code from but what im trying to do is to save the question and answer through a webhook. Currently the code only saves the question that the user asks but not the answer. The code is below "workflow.zapierSuccess = false; let currentDateTime = new Date(); const messageData = { date: currentDateTime, message: [{question: event.payload.text}] }; " I was wondering which variable the response is naturally saved under. I was also wondering where I might be able to find a list of the native variables so that I can refer to that.
s
Hi, not sure if this is answering your question, but maybe the json tab on the debugger panel is helpful?

https://cdn.discordapp.com/attachments/1132204411377172480/1132235354334842910/image.png

e
Thanks for the reply! Forgive my not knowing but is this just javascript? If I get more familiar with this programming language will I know to use things like "event.payload.text". I am trying to find a way to save the KB response as a variable too. The variable name is QR I tried "workflow.QR = event.payload.text" But it doesnt work. I dont really know what the other options are either so I am not sure where I can learn more. Any help would be appreciated! Thanks!
s
If you click on the knowledge agent you can see the variables you can access. The response is the "answer" one. There are tutorials and a webinar on this as well I think. You are on the right track!

https://cdn.discordapp.com/attachments/1132204411377172480/1132361964220321863/image.png

e
Hey @early-bird-43096, the Knowledgebase answer is stored in {{turn.KnowledgeAgent.answer}}. If you don't want the bot to answer automatically and just grab the answer to do some further processing, eanble the second option of the Knowledge Agent

https://cdn.discordapp.com/attachments/1132204411377172480/1132405932500987934/image.png

e
Oh! That's really helpful! Thanks for the help! Sorry for the ignorance but where exactly might I search for these tutorials and webinars?
That's really cool. Ill definitely check out where I can implement that as well!
s
Click "Docs" on the bottom left of the Studio