Share feedback, ideas and get community help

Updated 10 months ago

Variable Passing Between Bots

At a glance

The community member is simplifying their large bots by breaking them into smaller, organized ones. They are facing an issue where variables created and assigned in one bot are not being passed to subsequent bots, causing issues. The community member is unsure if this is the expected behavior or if variables should be saved to the session and passed between bots. They have a large number of customized variables, and creating them in every bot is time-consuming. Other community members acknowledge the issue and suggest it may be fixable.

In a later comment, the community member notes that the issue has been addressed and the updated functionality is working correctly, making it easier to only create variables in the bots that use them. They express gratitude to the project maintainer, Baptiste, for resolving the problem.

Useful resources
This is a question concerning an ongoing discussion.

Baptiste, you will be happy that I am simplifying my (CRAZY) large bots. So I am breaking them up into smaller organized ones.

So the issue that I am having-

Bot 1 (Variable is created and assigned value) > Bot 2 (Variable is created) = Works fine

Bot 1 (Variable is created and assigned value) > Bot 2 (Variable is not used, not created, doesn’t exist) > Bot 3 (Variable is created) = Doesn’t work the Variable does not have the assigned value from Bot 1.

The issue is I have a crazy amount of customized variables and to sit and create ALL of the variables in ALL of the simple bots takes a LOT of time just to simplify out to the different bots (versus doing them all in one). Is this how it is supposed to work, or should these variables be saved to the session and passed between bots and when I need them I can create the variable in that bot and use the value?

My understanding before is they should persist and be available to me without me having to create a TON of variables in every bot even if that bot doesn’t use that variable. Please let me know thanks!
B
g
8 comments
That's interesting.
Indeed, it does not properly pass the variables if an intermediary bot does not have it
I'll check if that can be fixed
@Baptiste I've been busy with some personal things so I haven't been on this project. Checked Gitub that you updated and completed this and my initial testing shows it is working correctly now. Thank you!!!!

I will let you know if I run into any problems but this will make it way easier if I don't have to create all the variables in all intermediate bots, just the ones that variable is used. LOVE IT!

You the MAN!
Glad to hear that!!
Add a reply
Sign up and join the conversation on Discord