Setting bot variable through webhook
# 🤝help
d
Hey guys Im trying to set a bot variable after receiving a webhook and fetching data from an api (that would be the value of the bot variable) so the variable stays the same for a period of time across all conversations. Is it possible?
f
Yes 100%. You would either use a variable with the Bot scope, as you mentioned or store it in a table, depends on what you think is the easiest for you to use. You would do the API call, and just save it to a variable like this as an example:
bot.variableName = response.data
d
Great, thank you so much! 🙏
f
You are very welcome, and let me know if you need some help setting it up
2 Views