git clone https://github.com/dudanogueira/rocketchat-botpress-lab-bot.git mycoolcompany
cd mycoolcompany
docker compose up
- Acess Rocket.Chat at http://localhost:3000
- Register the workspace
- Syncronize and Login with Rocket.Chat Cloud in Administration > Conectivity Services
- Install Botpress Conector from Luis Hlatki in Administration > Apps > search bot botpress
- http://localhost:3001
- configure botpress with admin username
- download and import bot from the rocketlab demo bot, using the bot id as "lab"
- click on the bot
- Click on train Chatbot (bottom right)
- create bot in Administration > Users, and apply the roles: bot, user, livechat-agent and livechat-manager
- create agent1 in Administration > Users, and apply the roles: user and livechat-agent
- Configure the Botpress Connector in Administration > Apps > Installed > Botpress Connector > Settings
- Rocket.Chat bot username: bot
- Botpress bot id: lab
- Botpress server URL: http://botpress:3000
- Default handover department: GENERAL
- save the bot configurations
- create an omnichannel GENERAL department in Top Left > Omnichannel > Departments with bot as agent, mark it to show at the registration form
- create an omnichannel OTHER department in Top Left > Omnichannel > Departments with agent1 as agent, anb don't mark it to show at the registration form
- edit the agent and the make it available in Top Left > Omnichannel > Agents
- Logout as you user, and log in with the bot user, and create a PAT (Personal Access Token) without 2 Factor Authentication
- update botpress with the PAT infos in your bot > Code Editor > Configurations > Current Bot > bot.config.json
- update the transfer room ID (you can get this ID while editing the department in Rocket.Chat) in your bot > Flows > Main Flow > transfer-room node at the set-variable action
Now, you can talk with your bot in http://localhost:3000/livechat