Using Bots with multiple projects
# support
x
I'm implementing a multi-project setup to handle multiple organizations, and I have a question about bot sharing. Currently, I have communication subscription bots that forward messages to external services (email, SMS, and fax). I'd like to know if there's a way to share bots across different projects to avoid duplicating code and deployments. When I attempted to reuse the bot files, the bot CLI didn't upload them again. Specific questions: Is bot sharing between projects supported? If not, what's the recommended approach for handling common bot functionality across multiple projects?
a
I'm definitely not an expert, but I'll take a stab at this one -- though hopefully @rahul1 or @reshma will correct me if I'm wrong. So... In my understanding, Bot sharing is not supported between projects. Bots are sandboxed within a project. -- though they can have the same "identifiers" -- and so can be called by the front end similarly. However, you can clone project (and the bots within it) -- as well as write some code to "upsert" bots through the identifier if you need the code in the bots to change. (I don't know how to do that last part of "upserting" yet, but I just believe in theory from some of the other posts that it can be done.) You can check out this thread - it might be helpful. https://discord.com/channels/905144809105260605/1094022380659155005/threads/1324955350373236806
219 Views