The Hidden Cheat For Variables
# 📖tutorials
s
**Part 1 Link**: https://www.loom.com/share/5d941b59b30947ab839d6c5a9f161fb3?sid=a1546b16-b3b9-4bfd-bce1-f8fa28725c21 In this tutorial, I will show you how to find the hidden cheat sheet for variables in BotPress. If you've been using BotPress, you're probably familiar with pulling different types of variables. One common variable is event.preview, which the latest user message. But what if you want to find other variables? I will guide you through accessing the JSON data and exploring different variables available. By the end of this tutorial, you'll be able to dig deeper into the event object and find solutions to your problems. **Part 2 Link**: https://www.loom.com/share/1ceb2e8b9a104a59942f4175995cdbc8?sid=14070289-d9be-43fb-a6f0-f644e0c2b6d1 In this tutorial, I dig a little deeper into how you can find/use variables in Botpress. Inluding from a list variable (or array) Help support these tutorials by supporting me: https://www.buymeacoffee.com/simplygreatgames
f
Omg so great!
You can also use the clipboard on the left and then just paste into your box
(for the JSON section)
s
@freezing-printer-49373 Thanks for adding that! i meant to mention that part. btw, it breaks for arrays. If you try to copy a var inside of an array it will copy it like so: {{event.nlu.intents.0.text}}. Just need to change it to {{event.nlu.intents[0].text}} for anyone wondering
c
Once again 😉 ! You killed it @straight-wolf-37371
h
When bot answers from KB it often says things like "Based on the context you provided" and "This information is based on provided context. For more detailed information refer to the source". Is this new?
Is there a certain way to include links in the KB text document that lets the bot know you want it to include that link when pulling from that piece of info?
g
yes and is there a way to prevent that?
4 Views