https://discord.gg/botpress logo
More Than 100 Variables Causes Autonomous Nodes to...
# 🤝help
s
When running an autonomous nodes with a bot that has more than 100 variables (bot, conversation, user, workflow), there is a ZodError. We are primarly focused on finishing the bot's development and will be unable to optimize or reduce the number of variables. We want to know if there is a way to disable certain variables from being used within a node or if there is a way for us to put some of those variables into a Zod Object/Schema and having a large schema. Please help 🙂 https://cdn.discordapp.com/attachments/1405206880913068042/1405206882075017216/image.png?ex=689dfc64&is=689caae4&hm=8306607e780ee80460e136ba12d7d0c6d1dbda4194bc0e7d53eda270dad1f15e&
@prehistoric-airplane-85682 I created a thread here 🙂
w
FWIW, this is a known issue and has been for over a year. We got around it by converting most user-level variables (which persist / are in scope for the entire bot) to workflow-level variables, and using subflows to keep the number of workflow vars in the main flow's scope under 100. Far from ideal, but may be worth a try if practical
p
You can also define a variable with type object and assign attributes to it as needed. ex:
Copy code
js
workflow.test = {
    name: "Leanne"
}
and then
Copy code
js
workflow.test.otherVar = "wassup"
w
^^ that is a great suggestion
w
you can set the variable as 'secret' and it'll be invisible to the autonomous node