https://discord.gg/botpress logo
#🤝help
Can the bot retrieve information from the user or their previous input?
# 🤝help
s

salmon-art-82621

07/05/2023, 9:07 PM
🤔 Is it possible for the bot to access the user or their previous input and provide a corresponding response?
r

rich-oxygen-43707

07/05/2023, 9:15 PM
You can save responses to user variables, and later retrieve those responses. https://botpress.com/docs/cloud/studio/variables/
s

salmon-art-82621

07/05/2023, 9:17 PM
Oh, thank you @rich-oxygen-43707 , I will give it a try 👍 Could you possibly provide me with an example so that I can use a similar approach?
r

rich-oxygen-43707

07/05/2023, 9:37 PM
Create user variable in bot settings. Capture workflow variable using capture card. Execute code to assign the input value to the user variable. (This example is slightly more complex because input field is not a simple text field.) That user variable is "permanent" so it can be retrieved later.
s

salmon-art-82621

07/05/2023, 9:38 PM
Thank you very much! 🙏 I will try it...
It's not as easy as I thought 😉
3 Views