This project establish communication between a Botpress bot and a Rocketchat bot account. It sends Rocket.Chat messages to Botpress server and translates Botpress events (bot replies) to Rocket.Chat messages.
NPM v6 and Node 10
git clone https://github.com/cengizmurat/botpress-rocketchat.git
cd botpress-rocketchat
npm install
If the installation stucks at a step, run the following
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
Configuration variables are needed in order to run the server. You can provide them either through environment variables or with a config.json
file.
The following environment variables are required:
BOTPRESS_URL
: URL of your Botpress server (ex:https://mybotpress.domain.com
)BOTPRESS_BOT
: ID of the Botpress botROCKETCHAT_HOST
: Host of your Rocketchat server (ex:myrocketchat.domain.com
)ROCKETCHAT_USERNAME
: The@username
of the account to connect toROCKETCHAT_PASSWORD
: The password of the accountROCKETCHAT_SSL
:true/false
(http
orhttps
?)
Or an example of a valid config.json
file:
{
"BOTPRESS_URL": "https://mybotpress.domain.com",
"BOTPRESS_BOT": "my-bot-id",
"ROCKETCHAT_HOST": "myrocketchat.domain.com",
"ROCKETCHAT_USERNAME": "myusername",
"ROCKETCHAT_PASSWORD": "mypassword",
"ROCKETCHAT_SSL": true
}
Once you have set up your variables, you can run the following command:
npm start