Regardless of bot type (e.g. Hubot, Botkit, Rasa, etc.), the Rocket.Chat SDK requires you to create a configuration with some variables for your environment. This configuration can be stored in a
.env file, for local development, for example. In production, they would need to be set on server startup.
The following is a list of all the environmental variables you can use in your project. Variables marked with an asterisk (
*) are mandatory.
URL of the Rocket.Chat instance to connect to. Can be specified as
Force bot to connect with SSL. If unset, it will try and detect from URL protocol.
Authorization method for a bot. Default:
The bot's username (account name users will summon the bot with). Must be registered on your Rocket.Chat server and granted
The bot user's password.
Stream callbacks receive messages from the listed channel name/s. Default:
Responding to channels and DMS
Stream callbacks receive messages from Livechat (true/false). Default:
Stream callbacks receive DMs with bot (true/false). Default:
Stream callbacks receive edited messages (true/false). Default:
Size of cache (LRU) for room (ID or name) lookups.
Max age of cache for room lookups.
Size of cache for Direct Message room lookups.
Max age of cache for DM lookups.
ID applied to message object to integration source. Default:
Admin user name for API calls used in SDK tests.
Admin user password for API calls used in SDK tests.
Name of the bot. Hubot listeners can respond to this.
Another name to respond to. If unset, the adapter sets the
Hubot scripts to require as NPM modules. Used only in some Docker instances.
The common set for the majority of bots is to listen and respond to direct messages and all new public channels and private groups:
Be aware you must add the bot's user as a member of the new private group(s) before it will respond.