├── .github └── workflows │ └── codeql.yml ├── .gitignore ├── INSTALL.MD ├── LICENSE ├── README.md ├── actions └── rocketchat │ ├── config-test.js │ ├── get-livechat-room-info.js │ ├── get-room-info.js │ ├── me-info.js │ ├── omnichannel-close-room.js │ ├── omnichannel-offline-message.js │ ├── omnichannel-transfer-room.js │ ├── omnichannel-visitor-info.js │ └── team-post-message.js ├── bot_lab.tgz ├── bot_lab ├── bot.config.json ├── content-elements │ ├── builtin_audio.json │ ├── builtin_card.json │ ├── builtin_carousel.json │ ├── builtin_file.json │ ├── builtin_image.json │ ├── builtin_location.json │ ├── builtin_single-choice.json │ ├── builtin_text.json │ ├── builtin_video.json │ └── dropdown.json ├── flows │ ├── Close-Room.flow.json │ ├── Close-Room.ui.json │ ├── Post-Message.flow.json │ ├── Post-Message.ui.json │ ├── Transfer-Room.flow.json │ ├── Transfer-Room.ui.json │ ├── error.flow.json │ ├── error.ui.json │ ├── main.flow.json │ ├── main.ui.json │ └── skills │ │ ├── Slot-cb04f5.flow.json │ │ ├── Slot-cb04f5.ui.json │ │ ├── choice-4af1b8.flow.json │ │ └── choice-4af1b8.ui.json ├── intents │ ├── negative.json │ ├── offline_message.json │ └── positive.json ├── media │ ├── 0rp0jq1h6biex8eg37e5-Audio record.mp3 │ ├── cmu80sglfgkh2pmchwi9-sample.pdf │ ├── p75uirqr6mdervuzfqpc-cat.png │ ├── s5unl0x9mf0775ws05m5-Samsung_Galaxy_S7_edge_samples_(25504568010).jpg │ ├── see8z47e13k5o43aaovn-cat.png │ ├── uvbmfc3mawbr8rffj0eg-movie.mp4 │ └── veo846xqa1xb2ui5as06-39603764921_71e4b52238_b.jpg └── revisions.json └── docker-compose.yml /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | schedule: 9 | - cron: "36 5 * * 1" 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | language: [ javascript ] 24 | 25 | steps: 26 | - name: Checkout 27 | uses: actions/checkout@v3 28 | 29 | - name: Initialize CodeQL 30 | uses: github/codeql-action/init@v2 31 | with: 32 | languages: ${{ matrix.language }} 33 | queries: +security-and-quality 34 | 35 | - name: Autobuild 36 | uses: github/codeql-action/autobuild@v2 37 | 38 | - name: Perform CodeQL Analysis 39 | uses: github/codeql-action/analyze@v2 40 | with: 41 | category: "/language:${{ matrix.language }}" 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | data* -------------------------------------------------------------------------------- /INSTALL.MD: -------------------------------------------------------------------------------- 1 | # Initial Setup 2 | 3 | ## Cloning and spinning container up 4 | 5 | ``` 6 | git clone https://github.com/dudanogueira/rocketchat-botpress-lab-bot.git mycoolcompany 7 | cd mycoolcompany 8 | docker compose up 9 | ``` 10 | 11 | ## Register Workspace and Login to Rocket.Chat Cloud 12 | - Acess Rocket.Chat at http://localhost:3000 13 | - Register the workspace 14 | - Syncronize and Login with Rocket.Chat Cloud in Administration > Conectivity Services 15 | - Install [Botpress Conector from Luis Hlatki](https://github.com/hlatki01/botpress-connector) in Administration > Apps > search bot botpress 16 | 17 | 18 | ## Configure Botpress 19 | - http://localhost:3001 20 | - configure botpress with admin username 21 | - [download](https://github.com/dudanogueira/rocketchat-botpress-lab-bot/raw/main/bot_lab.tgz) and import bot from the rocketlab demo bot, using the bot id as "lab" 22 | - click on the bot 23 | - Click on train Chatbot (bottom right) 24 | 25 | ## Create a bot and agent user and install Botpress Connector 26 | 27 | - create bot in Administration > Users, and apply the roles: bot, user, livechat-agent and livechat-manager 28 | - create agent1 in Administration > Users, and apply the roles: user and livechat-agent 29 | - Configure the Botpress Connector in Administration > Apps > Installed > Botpress Connector > Settings 30 | - Rocket.Chat bot username: bot 31 | - Botpress bot id: lab 32 | - Botpress server URL: http://botpress:3000 33 | - Default handover department: GENERAL 34 | - save the bot configurations 35 | 36 | ## Configure Omnichannel 37 | - create an omnichannel GENERAL department in Top Left > Omnichannel > Departments with bot as agent, mark it to show at the registration form 38 | - 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 39 | - edit the agent and the make it available in Top Left > Omnichannel > Agents 40 | - Logout as you user, and log in with the bot user, and create a PAT (Personal Access Token) without 2 Factor Authentication 41 | 42 | ## Configure Botpress with bot PAT and Department to Transfer 43 | - update botpress with the PAT infos in your bot > Code Editor > Configurations > Current Bot > bot.config.json 44 | - 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 45 | 46 | ## Try it out! 47 | Now, you can talk with your bot in [http://localhost:3000/livechat](http://localhost:3000/livechat) 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Duda Nogueira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rocketchat-botpress-lab-bot 2 | A bot that integrates RocketChat and Botpress 3 | 4 | [installation instructions](./INSTALL.MD) 5 | 6 | ## A cool BotPress Flow: 7 | ![image](https://user-images.githubusercontent.com/1761174/174685355-8916ec50-3268-431c-804f-8e7133d51b17.png) 8 | 9 | ## Integrated with Omnichannel LiveChat Widget: 10 | ![image](https://user-images.githubusercontent.com/1761174/174685492-0d1b7486-9c15-4370-805d-e7c3d617bcf9.png) 11 | 12 | ## With some cool techniques and good practices: 13 | ![image](https://user-images.githubusercontent.com/1761174/174685550-6aa21455-f429-40b5-95ab-47f3ccebf785.png) 14 | 15 | ## Check it out: 16 | ![image](https://user-images.githubusercontent.com/1761174/174685722-76114e24-2110-4828-beef-6dd4536caadd.png) 17 | 18 | ## And help us improve this! 19 | ![image](https://user-images.githubusercontent.com/1761174/174685858-6d1244c6-a8f8-4ef3-864f-495acf9bd154.png) 20 | -------------------------------------------------------------------------------- /actions/rocketchat/config-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Test Rocket.Chat Configuration 3 | * @title A Simple Config Test 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | */ 7 | const myAction = async (name, value) => { 8 | const globalConfig = await bp.config.getBotpressConfig() 9 | if (globalConfig['rocketchat_url']) { 10 | bp.logger.info('ROCKETCHAT:CONFIG:FOUND GLOBAL ', globalConfig) 11 | } else { 12 | bp.logger.info('ROCKETCHAT:CONFIG: TRYING LOCAL ', globalConfig) 13 | } 14 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 15 | 16 | if (botConfig['rocketchat_url']) { 17 | bp.logger.info('ROCKETCHAT:CONFIG:USING CONFIG ', globalConfig) 18 | session.has_rocketchat = true 19 | }else{ 20 | session.has_rocketchat = false 21 | } 22 | } 23 | 24 | return myAction(args.name, args.value) -------------------------------------------------------------------------------- /actions/rocketchat/get-livechat-room-info.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This Action will grab all Livechat information from a target room 3 | * @title Get Livechat Room Info 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} visitor_token - the visitor token 7 | */ 8 | 9 | const axios = require('axios') 10 | 11 | const RocketChatGetLiveChatRoomInfo = async () => { 12 | const globalConfig = await bp.config.getBotpressConfig() 13 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 14 | bp.logger.info('ROCKETCHAT:LIVECHAT ROOM INFO:TARGET: ' + event.target) 15 | 16 | const options = { 17 | method: 'GET', 18 | url: botConfig['rocketchat_url'] + '/api/v1/livechat/room', 19 | params: { token: args.visitor_token, rid: event.target }, 20 | headers: { 21 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 22 | 'X-User-Id': botConfig['rocketchat_userid'] 23 | } 24 | } 25 | 26 | await axios 27 | .request(options) 28 | .then(function(response) { 29 | session.visitor_info = response.data['visitor'] 30 | bp.logger.info('ROCKETCHAT:LIVECHAT ROOM INFO:GOT ', response) 31 | }) 32 | .catch(function(error) { 33 | bp.logger.error('ROCKETCHAT:LIVECHAT ROOM INFO:ERROR: ', error) 34 | session.room_info = false 35 | session.visitor_name = args.default_visitor_name 36 | }) 37 | } 38 | 39 | return RocketChatGetLiveChatRoomInfo() -------------------------------------------------------------------------------- /actions/rocketchat/get-room-info.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This Action will grab all information from a target room 3 | * @title Get Room Info 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} default_visitor_name - a Default visitor name to use 7 | */ 8 | 9 | const axios = require('axios') 10 | 11 | const RocketChatGetRoomInfo = async () => { 12 | const globalConfig = await bp.config.getBotpressConfig() 13 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 14 | bp.logger.info('ROCKETCHAT:ROOM INFO:TARGET: ' + event.target) 15 | 16 | const options = { 17 | method: 'GET', 18 | url: botConfig['rocketchat_url'] + '/api/v1/rooms.info', 19 | params: { roomId: event.target }, 20 | headers: { 21 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 22 | 'X-User-Id': botConfig['rocketchat_userid'] 23 | } 24 | } 25 | 26 | await axios 27 | .request(options) 28 | .then(function(response) { 29 | user.room_info = response.data['room'] 30 | session.room_info = response.data['room'] 31 | session.visitor_name = ' ' + session.room_info.fname 32 | bp.logger.info('ROCKETCHAT:ROOM INFO:GOT ', response.data['room']) 33 | }) 34 | .catch(function(error) { 35 | bp.logger.error('ROCKETCHAT:ROOM INFO:ERROR: ', error) 36 | session.room_info = false 37 | session.visitor_name = args.default_visitor_name 38 | }) 39 | } 40 | 41 | return RocketChatGetRoomInfo() -------------------------------------------------------------------------------- /actions/rocketchat/me-info.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Me Info - Get "me" (user/bot) information from Rocket.Chat 3 | * @title Get "Me" Info 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} [default_bot_name="Sir Hamster III"] a Default bot name to use 7 | */ 8 | 9 | const axios = require('axios') 10 | 11 | const myAction = async (name, value) => { 12 | const globalConfig = await bp.config.getBotpressConfig() 13 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 14 | bp.logger.info('ROCKETCHAT:ME INFO') 15 | 16 | const options = { 17 | method: 'GET', 18 | url: botConfig['rocketchat_url'] + '/api/v1/me', 19 | headers: { 20 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 21 | 'X-User-Id': botConfig['rocketchat_userid'] 22 | } 23 | } 24 | 25 | await axios 26 | .request(options) 27 | .then(function(response) { 28 | bp.logger.info('ROCKETCHAT:ME INFO: GOT :', response.data) 29 | session.serving_bot = response.data 30 | session.serving_bot_name = session.serving_bot['name'] 31 | }) 32 | .catch(function(error) { 33 | bp.logger.error('ROCKETCHAT:ME INFO:ERROR GETTING ', error) 34 | bp.logger.error('ROCKETCHAT:ME INFO:FALLBACK TO ', args.default_bot_name) 35 | 36 | session.has_rocketchat = false 37 | session.serving_bot_name = args.default_bot_name 38 | }) 39 | } 40 | 41 | return myAction(args.name, args.value) -------------------------------------------------------------------------------- /actions/rocketchat/omnichannel-close-room.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This action will transfer an Omnichannel Chat to a target department 3 | * @title Close Omnichannel Room 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | */ 7 | 8 | const axios = require('axios') 9 | 10 | const RocketChatOmnichannelCloseRoom = async () => { 11 | const botConfig = await bp.config.mergeBotConfig(event.botId, {}) 12 | const options = { 13 | method: 'POST', 14 | url: botConfig['rocketchat_url'] + '/api/v1/livechat/room.close', 15 | data: { 16 | rid: event.target, 17 | token: user.room_info.v.token 18 | }, 19 | headers: { 20 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 21 | 'X-User-Id': botConfig['rocketchat_userid'] 22 | } 23 | } 24 | 25 | await axios 26 | .request(options) 27 | .then(function(response) { 28 | user.transfer_attepmt = response 29 | user.transfer_success = true 30 | bp.logger.info('ROCKETCHAT: Close Room: ', response.data['room']) 31 | }) 32 | .catch(function(error) { 33 | bp.logger.error('ROCKETCHAT: Close Room: ', error) 34 | user.transfer_success = false 35 | }) 36 | } 37 | 38 | return RocketChatOmnichannelCloseRoom() -------------------------------------------------------------------------------- /actions/rocketchat/omnichannel-offline-message.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Post an offline message to the user department or default 3 | * @title Post Offline Message 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} name - Name of the visitor 7 | * @param {string} email - Email of the visitor 8 | * @param {string} message - offline message 9 | * @param {string} department - Department to follow the settings from 10 | */ 11 | 12 | const axios = require('axios') 13 | 14 | const myAction = async () => { 15 | const globalConfig = await bp.config.getBotpressConfig() 16 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 17 | var payload = { 18 | name: args.name, 19 | email: args.email, 20 | message: args.message, 21 | department: args.department 22 | } 23 | 24 | const options = { 25 | method: 'POST', 26 | url: botConfig['rocketchat_url'] + '/api/v1/livechat/offline.message', 27 | data: payload, 28 | headers: { 29 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 30 | 'X-User-Id': botConfig['rocketchat_userid'] 31 | } 32 | } 33 | 34 | bp.logger.info('ROCKETCHAT:OFFLINE MESSAGE:PAYLOAD ', payload) 35 | await axios 36 | .request(options) 37 | .then(function(response) { 38 | session.offline_message_sent = true 39 | session.offline_message = response.data 40 | bp.logger.info('ROCKETCHAT:OFFLINE MESSAGE GOT: ', response.data) 41 | }) 42 | .catch(function(error) { 43 | bp.logger.error('ROCKETCHAT:OFFLINE MESSAGE ERROR: ', error) 44 | session.offline_message_sent = false 45 | if (error.response) { 46 | bp.logger.error('ROCKETCHAT:OFFLINE MESSAGE ERROR JSON: ', error.response.data) 47 | session.offline_message_sent_error = error.response.data 48 | } 49 | }) 50 | } 51 | 52 | return myAction() -------------------------------------------------------------------------------- /actions/rocketchat/omnichannel-transfer-room.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This action will transfer an Omnichannel Chat to a target department 3 | * @title Transfer Room 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} target_department - The target Department 7 | * @param {string} visitor_token - The visitor token 8 | */ 9 | 10 | const axios = require('axios') 11 | 12 | const RocketChatOmnichannelTransferRoom = async () => { 13 | const botConfig = await bp.config.mergeBotConfig(event.botId, {}) 14 | const options = { 15 | method: 'POST', 16 | url: botConfig['rocketchat_url'] + '/api/v1/livechat/room.transfer', 17 | data: { 18 | rid: event.target, 19 | token: args.visitor_token, 20 | department: args.target_department 21 | }, 22 | headers: { 23 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 24 | 'X-User-Id': botConfig['rocketchat_userid'] 25 | } 26 | } 27 | 28 | await axios 29 | .request(options) 30 | .then(function(response) { 31 | user.transfer_success = true 32 | bp.logger.info('ROCKETCHAT:TRANSFER ROOM:INFO: ', response.data['room']) 33 | }) 34 | .catch(function(error) { 35 | bp.logger.error('ROCKETCHAT:TRANSFER ROOM:ERROR: ', error) 36 | user.transfer_success = false 37 | }) 38 | } 39 | 40 | return RocketChatOmnichannelTransferRoom() 41 | -------------------------------------------------------------------------------- /actions/rocketchat/omnichannel-visitor-info.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This Action will grab all Livechat information from a visitor 3 | * @title Get Livechat Visitor Info 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} visitor_token - the visitor token 7 | */ 8 | 9 | const axios = require('axios') 10 | 11 | const RocketChatGetLiveChatVisitorInfo = async () => { 12 | const globalConfig = await bp.config.getBotpressConfig() 13 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 14 | 15 | const options = { 16 | method: 'GET', 17 | url: botConfig['rocketchat_url'] + '/api/v1/livechat/visitor/' + args.visitor_token 18 | } 19 | 20 | await axios 21 | .request(options) 22 | .then(function(response) { 23 | session.visitor_info = response.data['visitor'] 24 | bp.logger.info('ROCKETCHAT:LIVECHAT VISITOR INFO:GOT ', response) 25 | }) 26 | .catch(function(error) { 27 | bp.logger.error('ROCKETCHAT:LIVECHAT VISITOR INFO:ERROR: ', error) 28 | session.room_info = false 29 | session.visitor_name = args.default_visitor_name 30 | }) 31 | } 32 | 33 | return RocketChatGetLiveChatVisitorInfo() -------------------------------------------------------------------------------- /actions/rocketchat/team-post-message.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Post a message to a channel or direct. The user sending the message must on the room. 3 | * @title Post Message to Channel 4 | * @category RocketChat 5 | * @author Duda Nogueira 6 | * @param {string} channel - Channel ID. #GENERAL or @user.name or fZeZmHPLqTQfDsQEe 7 | * @param {string} message - Text message to send 8 | * @param {string} message_extra - Json to extend the message payload 9 | */ 10 | 11 | const axios = require('axios') 12 | 13 | const myAction = async () => { 14 | const globalConfig = await bp.config.getBotpressConfig() 15 | const botConfig = await bp.config.mergeBotConfig(event.botId, globalConfig) 16 | var payload = { 17 | channel: args.channel, 18 | text: args.message 19 | } 20 | 21 | if (args.message_extra) { 22 | const message_extra = JSON.parse(args.message_extra) 23 | payload = Object.assign({}, message_extra, payload) 24 | } 25 | 26 | const options = { 27 | method: 'POST', 28 | url: botConfig['rocketchat_url'] + '/api/v1/chat.postMessage', 29 | data: payload, 30 | headers: { 31 | 'X-Auth-Token': botConfig['rocketchat_auth_token'], 32 | 'X-User-Id': botConfig['rocketchat_userid'] 33 | } 34 | } 35 | 36 | bp.logger.info('ROCKETCHAT:POST MESSAGE:PAYLOAD ', payload) 37 | await axios 38 | .request(options) 39 | .then(function(response) { 40 | session.message_sent = true 41 | session.message_posted = response.data['message'] 42 | bp.logger.info('ROCKETCHAT:POST MESSAGE: ', response.data['message']) 43 | }) 44 | .catch(function(error) { 45 | bp.logger.error('ROCKETCHAT:POST MESSAGE ERROR: ', error) 46 | session.message_sent = false 47 | if (error.response) { 48 | bp.logger.error('ROCKETCHAT:POST MESSAGE ERROR JSON: ', error.response.data) 49 | session.message_posted_error = error.response.data 50 | } 51 | }) 52 | } 53 | 54 | return myAction() -------------------------------------------------------------------------------- /bot_lab.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab.tgz -------------------------------------------------------------------------------- /bot_lab/bot.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rocketchat_userid": "ZrrcA9vfpmQDAYoEi", 3 | "rocketchat_auth_token": "Y-Z8sGlg9vNxF7O5eHnTQFZubvvtP7CkCJlsPZ-MDQZ", 4 | "rocketchat_url": "http://rocketchat:3000", 5 | "locked": false, 6 | "disabled": false, 7 | "private": false, 8 | "details": {}, 9 | "$schema": "../botpress.config.schema.json", 10 | "description": "", 11 | "active": true, 12 | "version": "12.27.0", 13 | "author": "Botpress, Inc.", 14 | "license": "AGPL-3.0", 15 | "imports": { 16 | "modules": [], 17 | "incomingMiddleware": [], 18 | "outgoingMiddleware": [], 19 | "contentTypes": [ 20 | "builtin_action-button", 21 | "builtin_audio", 22 | "builtin_card", 23 | "builtin_carousel", 24 | "dropdown", 25 | "builtin_file", 26 | "builtin_image", 27 | "builtin_location", 28 | "builtin_single-choice", 29 | "builtin_text", 30 | "builtin_video" 31 | ] 32 | }, 33 | "dialog": { 34 | "timeoutInterval": "25m", 35 | "janitorInterval": "10s", 36 | "sessionTimeoutInterval": "30m" 37 | }, 38 | "logs": { 39 | "expiration": "1 week", 40 | "dbOutput": { 41 | "expiration": "2 weeks", 42 | "janitorInterval": "30s" 43 | }, 44 | "fileOutput": { 45 | "enabled": false, 46 | "folder": "./", 47 | "maxFileSize": 10000 48 | } 49 | }, 50 | "defaultLanguage": "en", 51 | "languages": [ 52 | "en" 53 | ], 54 | "id": "lab", 55 | "name": "lab", 56 | "pipeline_status": { 57 | "current_stage": { 58 | "id": "prod", 59 | "promoted_on": "2022-05-09T23:03:10.214Z", 60 | "promoted_by": "system" 61 | } 62 | }, 63 | "httpServer": { 64 | "host": "localhost", 65 | "port": 3000, 66 | "backlog": 0, 67 | "bodyLimit": "10mb", 68 | "cors": { 69 | "enabled": true 70 | }, 71 | "externalUrl": "", 72 | "session": { 73 | "enabled": false, 74 | "maxAge": "1h" 75 | }, 76 | "socketTransports": [ 77 | "websocket", 78 | "polling" 79 | ], 80 | "rateLimit": { 81 | "enabled": false, 82 | "limitWindow": "30s", 83 | "limit": 600 84 | }, 85 | "headers": { 86 | "X-Powered-By": "Botpress" 87 | } 88 | }, 89 | "modules": [ 90 | { 91 | "location": "MODULES_ROOT/analytics", 92 | "enabled": true 93 | }, 94 | { 95 | "location": "MODULES_ROOT/basic-skills", 96 | "enabled": true 97 | }, 98 | { 99 | "location": "MODULES_ROOT/bot-improvement", 100 | "enabled": false 101 | }, 102 | { 103 | "location": "MODULES_ROOT/broadcast", 104 | "enabled": false 105 | }, 106 | { 107 | "location": "MODULES_ROOT/builtin", 108 | "enabled": true 109 | }, 110 | { 111 | "location": "MODULES_ROOT/channel-web", 112 | "enabled": true 113 | }, 114 | { 115 | "location": "MODULES_ROOT/code-editor", 116 | "enabled": true 117 | }, 118 | { 119 | "location": "MODULES_ROOT/examples", 120 | "enabled": true 121 | }, 122 | { 123 | "location": "MODULES_ROOT/google-speech", 124 | "enabled": false 125 | }, 126 | { 127 | "location": "MODULES_ROOT/hitl", 128 | "enabled": false 129 | }, 130 | { 131 | "location": "MODULES_ROOT/hitlnext", 132 | "enabled": true 133 | }, 134 | { 135 | "location": "MODULES_ROOT/libraries", 136 | "enabled": false 137 | }, 138 | { 139 | "location": "MODULES_ROOT/misunderstood", 140 | "enabled": true 141 | }, 142 | { 143 | "location": "MODULES_ROOT/ndu", 144 | "enabled": false 145 | }, 146 | { 147 | "location": "MODULES_ROOT/nlu", 148 | "enabled": true 149 | }, 150 | { 151 | "location": "MODULES_ROOT/testing", 152 | "enabled": true 153 | }, 154 | { 155 | "location": "MODULES_ROOT/uipath", 156 | "enabled": false 157 | } 158 | ], 159 | "pro": { 160 | "collaboratorsAuthStrategies": [ 161 | "default" 162 | ], 163 | "enabled": false, 164 | "licenseKey": "paste your license key here", 165 | "monitoring": { 166 | "enabled": false, 167 | "collectionInterval": "10s", 168 | "retentionPeriod": "10d", 169 | "janitorInterval": "15m" 170 | }, 171 | "alerting": { 172 | "enabled": false, 173 | "watcherInterval": "10s", 174 | "retentionPeriod": "10d", 175 | "janitorInterval": "15m", 176 | "rules": [] 177 | }, 178 | "externalAuth": { 179 | "enabled": false, 180 | "algorithms": [ 181 | "HS256" 182 | ], 183 | "publicKey": "insert key here", 184 | "jwksClient": {} 185 | }, 186 | "branding": { 187 | "admin": {}, 188 | "studio": {} 189 | } 190 | }, 191 | "superAdmins": [ 192 | { 193 | "email": "dudanogueira@gmail.com", 194 | "strategy": "default" 195 | } 196 | ], 197 | "sendUsageStats": true, 198 | "dataRetention": { 199 | "janitorInterval": "10m", 200 | "policies": {} 201 | }, 202 | "botCategories": [], 203 | "allowServerReboot": true, 204 | "fileUpload": { 205 | "maxFileSize": "25mb", 206 | "allowedMimeTypes": [ 207 | "image/jpeg", 208 | "image/png", 209 | "image/gif", 210 | "image/bmp", 211 | "image/webp", 212 | "audio/mpeg", 213 | "audio/webm", 214 | "audio/ogg", 215 | "audio/wav", 216 | "video/mp4", 217 | "video/webm", 218 | "video/ogg", 219 | "application/pdf" 220 | ] 221 | }, 222 | "jwtToken": { 223 | "duration": "1h", 224 | "allowRefresh": true, 225 | "useCookieStorage": false, 226 | "cookieOptions": {} 227 | }, 228 | "autoRevision": false, 229 | "eventCollector": { 230 | "enabled": true, 231 | "collectionInterval": "1s", 232 | "retentionPeriod": "30d", 233 | "ignoredEventTypes": [ 234 | "visit", 235 | "typing" 236 | ], 237 | "ignoredEventProperties": [], 238 | "debuggerProperties": [ 239 | "ndu.triggers", 240 | "ndu.predictions", 241 | "nlu.predictions", 242 | "state", 243 | "processing", 244 | "activeProcessing" 245 | ] 246 | }, 247 | "botMonitoring": { 248 | "enabled": true, 249 | "interval": "1m" 250 | }, 251 | "authStrategies": { 252 | "default": { 253 | "type": "basic", 254 | "allowSelfSignup": false, 255 | "options": { 256 | "maxLoginAttempt": 0 257 | } 258 | } 259 | }, 260 | "showPoweredBy": true, 261 | "noRepeatPolicy": false, 262 | "additionalLanguages": [], 263 | "actionServers": { 264 | "local": { 265 | "port": 4000, 266 | "enabled": true 267 | }, 268 | "remotes": [] 269 | }, 270 | "experimental": false, 271 | "telemetry": { 272 | "entriesLimit": 1000 273 | }, 274 | "appSecret": "NAbm9m6OLh-cKndb4W8BPehOSlT72gsL6Ud_iU3D" 275 | } -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_audio.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_audio-5HHIUZ", 4 | "formData": { 5 | "typing$en": true, 6 | "audio$en": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/0rp0jq1h6biex8eg37e5-Audio%20record.mp3", 7 | "title$en": "Title of the Audio FIle" 8 | }, 9 | "createdBy": "admin", 10 | "createdOn": "2022-05-13T12:57:53.589Z", 11 | "modifiedOn": "2022-05-13T12:58:11.798Z" 12 | } 13 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_card.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_card-y2rOio", 4 | "formData": { 5 | "title$en": "Card Title", 6 | "subtitle$en": "Card Subtitle", 7 | "image$en": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/p75uirqr6mdervuzfqpc-cat.png", 8 | "actions$en": [ 9 | { 10 | "action": "Say something", 11 | "title": "Title of Action Button", 12 | "text": "text the card's action button" 13 | } 14 | ] 15 | }, 16 | "createdBy": "admin", 17 | "createdOn": "2022-05-13T13:03:53.701Z", 18 | "modifiedOn": "2022-05-13T13:03:53.701Z" 19 | } 20 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_carousel.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_carousel-rqrWFl", 4 | "formData": { 5 | "typing$en": true, 6 | "items$en": [ 7 | { 8 | "title": "Carousel", 9 | "subtitle": "Carousel Subtitle", 10 | "image": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/s5unl0x9mf0775ws05m5-Samsung_Galaxy_S7_edge_samples_(25504568010).jpg", 11 | "actions": [ 12 | { 13 | "action": "Postback", 14 | "title": "Carousel action button", 15 | "payload": "postback payload" 16 | } 17 | ] 18 | }, 19 | { 20 | "title": "Another Carousel", 21 | "subtitle": "Subtitle of the second Carousel", 22 | "image": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/veo846xqa1xb2ui5as06-39603764921_71e4b52238_b.jpg", 23 | "actions": [ 24 | { 25 | "action": "Open URL", 26 | "title": "Second Carousel Action", 27 | "url": "http://terra.com.br" 28 | } 29 | ] 30 | } 31 | ] 32 | }, 33 | "createdBy": "admin", 34 | "createdOn": "2022-05-26T13:32:03.718Z", 35 | "modifiedOn": "2022-05-26T13:34:27.047Z" 36 | } 37 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_file.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_file-f6njrS", 4 | "formData": { 5 | "typing$en": true, 6 | "file$en": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/cmu80sglfgkh2pmchwi9-sample.pdf", 7 | "title$en": "Sample PDF" 8 | }, 9 | "createdBy": "admin", 10 | "createdOn": "2022-05-26T13:39:05.451Z", 11 | "modifiedOn": "2022-05-26T13:39:05.451Z" 12 | } 13 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_image.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_image-IUrN-w", 4 | "formData": { 5 | "typing$en": true, 6 | "image$en": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/see8z47e13k5o43aaovn-cat.png", 7 | "title$en": "Title of an Image" 8 | }, 9 | "createdBy": "admin", 10 | "createdOn": "2022-05-13T13:05:22.142Z", 11 | "modifiedOn": "2022-05-13T13:05:22.142Z" 12 | } 13 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_location.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_location-y4cl3c", 4 | "formData": { 5 | "typing$en": true, 6 | "latitude$en": -19.9398258, 7 | "longitude$en": -43.9329151, 8 | "address$en": "Belo Horizonte", 9 | "title$en": "Nice Place" 10 | }, 11 | "createdBy": "admin", 12 | "createdOn": "2022-05-26T13:40:32.506Z", 13 | "modifiedOn": "2022-05-26T13:40:32.506Z" 14 | } 15 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_single-choice.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_single-choice-dYJNFS", 4 | "formData": { 5 | "dropdownPlaceholder$en": "Select...", 6 | "choices$en": [ 7 | { 8 | "title": "Content Type Demo", 9 | "value": "1" 10 | }, 11 | { 12 | "title": "Transfer Room", 13 | "value": "2" 14 | }, 15 | { 16 | "title": "Close Room", 17 | "value": "3" 18 | }, 19 | { 20 | "title": "Post Text Message to a Channel", 21 | "value": "4" 22 | }, 23 | { 24 | "title": "Post Extended Message to a Channel", 25 | "value": "5" 26 | } 27 | ], 28 | "markdown$en": true, 29 | "disableFreeText$en": false, 30 | "typing$en": true, 31 | "text$en": "Please, select one of the options bellow", 32 | "isDropdown$en": false 33 | }, 34 | "createdBy": "admin", 35 | "createdOn": "2022-05-07T13:59:46.690Z", 36 | "modifiedOn": "2022-06-20T18:52:02.019Z" 37 | } 38 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_text.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_text-KSaUnd", 4 | "formData": { 5 | "text$en": "Hello{{session.visitor_name}}! My name is {{session.serving_bot_name}}\nHow can I help you today?", 6 | "markdown$en": true, 7 | "typing$en": true 8 | }, 9 | "createdBy": "admin", 10 | "createdOn": "2022-05-07T13:11:21.164Z", 11 | "modifiedOn": "2022-05-09T23:35:25.429Z" 12 | }, 13 | { 14 | "id": "builtin_text-R0538G", 15 | "formData": { 16 | "text$en": "Sorry! I was not able to understand that.", 17 | "markdown$en": true, 18 | "typing$en": true 19 | }, 20 | "createdBy": "admin", 21 | "createdOn": "2022-05-13T13:14:18.928Z", 22 | "modifiedOn": "2022-05-13T13:14:18.928Z" 23 | }, 24 | { 25 | "id": "builtin_text-U81uJf", 26 | "formData": { 27 | "text$en": "I was not able to send a message :( Reason: {{session.message_posted_error.error}}", 28 | "markdown$en": true, 29 | "typing$en": true 30 | }, 31 | "createdBy": "admin", 32 | "createdOn": "2022-05-26T11:35:19.784Z", 33 | "modifiedOn": "2022-06-21T12:03:37.188Z" 34 | }, 35 | { 36 | "id": "builtin_text-OC9rEB", 37 | "formData": { 38 | "text$en": "This the Error Handling Flow.", 39 | "markdown$en": true, 40 | "typing$en": true 41 | }, 42 | "createdBy": "admin", 43 | "createdOn": "2022-05-26T13:56:35.955Z", 44 | "modifiedOn": "2022-05-26T13:56:35.955Z" 45 | }, 46 | { 47 | "id": "builtin_text-wniPjb", 48 | "formData": { 49 | "text$en": "Success! The Message was Posted. MESSAGE ID: {{session.message_posted._id}}", 50 | "markdown$en": true, 51 | "typing$en": true 52 | }, 53 | "createdBy": "admin", 54 | "createdOn": "2022-06-20T18:41:22.837Z", 55 | "modifiedOn": "2022-06-21T12:01:58.169Z" 56 | }, 57 | { 58 | "id": "builtin_text-kVsxXC", 59 | "formData": { 60 | "text$en": "Text Content Demo", 61 | "markdown$en": true, 62 | "typing$en": true 63 | }, 64 | "createdBy": "admin", 65 | "createdOn": "2022-06-20T18:49:15.349Z", 66 | "modifiedOn": "2022-06-20T18:49:15.349Z" 67 | }, 68 | { 69 | "id": "builtin_text-jexsmi", 70 | "formData": { 71 | "text$en": "Could not transfer. no Agents.", 72 | "markdown$en": true, 73 | "typing$en": true 74 | }, 75 | "createdBy": "admin", 76 | "createdOn": "2022-06-20T19:06:12.405Z", 77 | "modifiedOn": "2022-06-20T21:04:39.959Z" 78 | }, 79 | { 80 | "id": "builtin_text-uFNm9g", 81 | "formData": { 82 | "text$en": "Ok, before we wrap this up... can I help you with anything else?", 83 | "markdown$en": true, 84 | "typing$en": true 85 | }, 86 | "createdBy": "admin", 87 | "createdOn": "2022-06-20T20:58:28.013Z", 88 | "modifiedOn": "2022-06-20T20:58:28.013Z" 89 | }, 90 | { 91 | "id": "builtin_text-UtDbfv", 92 | "formData": { 93 | "text$en": "Do you want to leave an offline message?", 94 | "markdown$en": true, 95 | "typing$en": true 96 | }, 97 | "createdBy": "admin", 98 | "createdOn": "2022-06-20T21:05:49.381Z", 99 | "modifiedOn": "2022-06-20T22:08:21.655Z" 100 | }, 101 | { 102 | "id": "builtin_text-OI_sY1", 103 | "formData": { 104 | "text$en": "Please, type the message you want to send.", 105 | "markdown$en": true, 106 | "typing$en": true 107 | }, 108 | "createdBy": "admin", 109 | "createdOn": "2022-06-20T21:17:37.377Z", 110 | "modifiedOn": "2022-06-20T21:17:37.377Z" 111 | }, 112 | { 113 | "id": "builtin_text-1oqC1z", 114 | "formData": { 115 | "text$en": "Offline Message Sent", 116 | "markdown$en": true, 117 | "typing$en": true 118 | }, 119 | "createdBy": "admin", 120 | "createdOn": "2022-06-21T12:41:54.904Z", 121 | "modifiedOn": "2022-06-21T12:41:54.904Z" 122 | }, 123 | { 124 | "id": "builtin_text-9Ib6L5", 125 | "formData": { 126 | "text$en": "Ok, bye now.", 127 | "markdown$en": true, 128 | "typing$en": true 129 | }, 130 | "createdBy": "admin", 131 | "createdOn": "2022-06-21T12:44:28.148Z", 132 | "modifiedOn": "2022-06-21T12:44:28.148Z" 133 | }, 134 | { 135 | "id": "builtin_text-Ji5TpK", 136 | "formData": { 137 | "text$en": "Success! The chat was transferred.", 138 | "markdown$en": true, 139 | "typing$en": true 140 | }, 141 | "createdBy": "admin", 142 | "createdOn": "2022-06-21T18:18:31.055Z", 143 | "modifiedOn": "2022-06-21T18:18:31.055Z" 144 | }, 145 | { 146 | "id": "builtin_text-4x-hw2", 147 | "formData": { 148 | "text$en": "Error while sending offline message: {{session.offline_message_sent_error.reason}}", 149 | "markdown$en": true, 150 | "typing$en": true 151 | }, 152 | "createdBy": "admin", 153 | "createdOn": "2022-06-22T21:11:36.196Z", 154 | "modifiedOn": "2022-06-22T21:34:32.845Z" 155 | } 156 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/builtin_video.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "builtin_video-wOC24r", 4 | "formData": { 5 | "typing$en": true, 6 | "video$en": "/api/v1/bots/BOT_ID_PLACEHOLDER/media/uvbmfc3mawbr8rffj0eg-movie.mp4", 7 | "title$en": "Sample Movie" 8 | }, 9 | "createdBy": "admin", 10 | "createdOn": "2022-05-26T13:41:35.834Z", 11 | "modifiedOn": "2022-05-26T13:41:35.834Z" 12 | } 13 | ] -------------------------------------------------------------------------------- /bot_lab/content-elements/dropdown.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "dropdown-j1SKlD", 4 | "formData": { 5 | "buttonText$en": "message on button", 6 | "placeholderText$en": "Select a choice", 7 | "displayInKeyboard$en": false, 8 | "markdown$en": true, 9 | "typing$en": true, 10 | "message$en": "Dropdown Message", 11 | "options$en": [ 12 | { 13 | "label": "Label1", 14 | "value": "Value1" 15 | }, 16 | { 17 | "label": "Label2", 18 | "value": "Value2" 19 | } 20 | ], 21 | "allowMultiple$en": true, 22 | "width$en": 100, 23 | "allowCreation$en": true 24 | }, 25 | "createdBy": "admin", 26 | "createdOn": "2022-05-26T13:36:53.849Z", 27 | "modifiedOn": "2022-05-26T13:37:32.127Z" 28 | } 29 | ] -------------------------------------------------------------------------------- /bot_lab/flows/Close-Room.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": {}, 4 | "startNode": "entry", 5 | "description": "", 6 | "nodes": [ 7 | { 8 | "id": "a4bcdeef9c", 9 | "name": "entry", 10 | "onEnter": [], 11 | "onReceive": null, 12 | "next": [ 13 | { 14 | "condition": "true", 15 | "node": "more-help" 16 | } 17 | ], 18 | "type": "standard" 19 | }, 20 | { 21 | "id": "b20f6d7465", 22 | "name": "close-room", 23 | "next": [ 24 | { 25 | "condition": "true", 26 | "conditionType": "always", 27 | "node": "END" 28 | } 29 | ], 30 | "onEnter": [ 31 | "rocketchat/omnichannel-close-room {}" 32 | ], 33 | "onReceive": null, 34 | "type": "standard" 35 | }, 36 | { 37 | "id": "ff94531b9b", 38 | "name": "more-help", 39 | "next": [ 40 | { 41 | "condition": "event.nlu.intent.name === 'negative'", 42 | "conditionType": "intent", 43 | "node": "close-room" 44 | }, 45 | { 46 | "condition": "event.nlu.intent.name === 'positive'", 47 | "conditionType": "intent", 48 | "node": "main.flow.json#menu" 49 | } 50 | ], 51 | "onEnter": [ 52 | "say #!builtin_text-uFNm9g" 53 | ], 54 | "onReceive": [], 55 | "type": "standard" 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /bot_lab/flows/Close-Room.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "a4bcdeef9c", 5 | "position": { 6 | "x": 60, 7 | "y": 95 8 | } 9 | }, 10 | { 11 | "id": "b20f6d7465", 12 | "position": { 13 | "x": 750, 14 | "y": -5 15 | } 16 | }, 17 | { 18 | "id": "ff94531b9b", 19 | "position": { 20 | "x": 380, 21 | "y": 60 22 | } 23 | } 24 | ], 25 | "links": [ 26 | { 27 | "source": "a4bcdeef9c", 28 | "sourcePort": "out0", 29 | "target": "ff94531b9b", 30 | "points": [ 31 | { 32 | "x": 260, 33 | "y": 159 34 | }, 35 | { 36 | "x": 380, 37 | "y": 78 38 | } 39 | ] 40 | }, 41 | { 42 | "source": "ff94531b9b", 43 | "sourcePort": "out0", 44 | "target": "b20f6d7465", 45 | "points": [ 46 | { 47 | "x": 580, 48 | "y": 171 49 | }, 50 | { 51 | "x": 751, 52 | "y": 13 53 | } 54 | ] 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /bot_lab/flows/Post-Message.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": {}, 4 | "startNode": "entry", 5 | "description": "", 6 | "nodes": [ 7 | { 8 | "id": "ecc42b9e9b", 9 | "name": "entry", 10 | "onEnter": [], 11 | "onReceive": null, 12 | "next": [ 13 | { 14 | "condition": "true", 15 | "node": "post-message" 16 | } 17 | ], 18 | "type": "standard" 19 | }, 20 | { 21 | "id": "bd1169d7b6", 22 | "name": "post-message", 23 | "next": [ 24 | { 25 | "condition": "session.message_sent == true", 26 | "conditionType": "props", 27 | "node": "post-message-success" 28 | }, 29 | { 30 | "condition": "true", 31 | "node": "post-message-error" 32 | } 33 | ], 34 | "onEnter": [], 35 | "onReceive": null, 36 | "type": "standard" 37 | }, 38 | { 39 | "id": "025c6bb43f", 40 | "name": "post-message-error", 41 | "next": [ 42 | { 43 | "condition": "true", 44 | "conditionType": "always", 45 | "node": "main.flow.json#menu" 46 | } 47 | ], 48 | "onEnter": [ 49 | "say #!builtin_text-U81uJf" 50 | ], 51 | "onReceive": null, 52 | "type": "standard" 53 | }, 54 | { 55 | "id": "e73494b5f0", 56 | "name": "post-message-success", 57 | "next": [ 58 | { 59 | "condition": "true", 60 | "conditionType": "always", 61 | "node": "main.flow.json#menu" 62 | } 63 | ], 64 | "onEnter": [ 65 | "say #!builtin_text-wniPjb" 66 | ], 67 | "onReceive": null, 68 | "type": "standard" 69 | } 70 | ] 71 | } -------------------------------------------------------------------------------- /bot_lab/flows/Post-Message.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "ecc42b9e9b", 5 | "position": { 6 | "x": 100, 7 | "y": 100 8 | } 9 | }, 10 | { 11 | "id": "bd1169d7b6", 12 | "position": { 13 | "x": 450, 14 | "y": 55 15 | } 16 | }, 17 | { 18 | "id": "025c6bb43f", 19 | "position": { 20 | "x": 865, 21 | "y": 140 22 | } 23 | }, 24 | { 25 | "id": "e73494b5f0", 26 | "position": { 27 | "x": 860, 28 | "y": -15 29 | } 30 | } 31 | ], 32 | "links": [ 33 | { 34 | "source": "bd1169d7b6", 35 | "sourcePort": "out1", 36 | "target": "025c6bb43f", 37 | "points": [ 38 | { 39 | "x": 650, 40 | "y": 129 41 | }, 42 | { 43 | "x": 865, 44 | "y": 158 45 | } 46 | ] 47 | }, 48 | { 49 | "source": "bd1169d7b6", 50 | "sourcePort": "out0", 51 | "target": "e73494b5f0", 52 | "points": [ 53 | { 54 | "x": 650, 55 | "y": 99 56 | }, 57 | { 58 | "x": 861, 59 | "y": 2 60 | } 61 | ] 62 | }, 63 | { 64 | "source": "ecc42b9e9b", 65 | "sourcePort": "out0", 66 | "target": "bd1169d7b6", 67 | "points": [ 68 | { 69 | "x": 300, 70 | "y": 144 71 | }, 72 | { 73 | "x": 451, 74 | "y": 72 75 | } 76 | ] 77 | } 78 | ] 79 | } -------------------------------------------------------------------------------- /bot_lab/flows/Transfer-Room.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": {}, 4 | "startNode": "entry", 5 | "description": "", 6 | "nodes": [ 7 | { 8 | "id": "2d51e5d276", 9 | "name": "entry", 10 | "onEnter": [], 11 | "onReceive": null, 12 | "next": [ 13 | { 14 | "condition": "true", 15 | "node": "transfer_room" 16 | } 17 | ], 18 | "type": "standard" 19 | }, 20 | { 21 | "id": "90ab7b245e", 22 | "name": "transfer-success", 23 | "next": [ 24 | { 25 | "condition": "true", 26 | "conditionType": "always", 27 | "node": "END" 28 | } 29 | ], 30 | "onEnter": [ 31 | "say #!builtin_text-Ji5TpK" 32 | ], 33 | "onReceive": null, 34 | "type": "standard" 35 | }, 36 | { 37 | "id": "ccf90981c5", 38 | "name": "transfer_error", 39 | "next": [ 40 | { 41 | "condition": "true", 42 | "conditionType": "always", 43 | "node": "question-leave-offline-message" 44 | } 45 | ], 46 | "onEnter": [ 47 | "say #!builtin_text-jexsmi" 48 | ], 49 | "onReceive": null, 50 | "type": "standard" 51 | }, 52 | { 53 | "id": "1455e690f5", 54 | "name": "transfer_room", 55 | "next": [ 56 | { 57 | "condition": "user.transfer_success == true", 58 | "conditionType": "raw", 59 | "node": "transfer-success" 60 | }, 61 | { 62 | "condition": "true", 63 | "conditionType": "always", 64 | "node": "transfer_error" 65 | } 66 | ], 67 | "onEnter": [ 68 | "rocketchat/omnichannel-transfer-room {\"target_department\":\"{{user.department}}\",\"visitor_token\":\"{{user.room_info.v.token}}\"}" 69 | ], 70 | "onReceive": null, 71 | "type": "standard" 72 | }, 73 | { 74 | "id": "2fbaa1218e", 75 | "name": "question-leave-offline-message", 76 | "next": [ 77 | { 78 | "condition": "event.nlu.intent.name === 'positive'", 79 | "conditionType": "intent", 80 | "node": "Slot-cb04f5" 81 | }, 82 | { 83 | "condition": "event.nlu.intent.name === 'negative'", 84 | "conditionType": "intent", 85 | "node": "no-offline-message" 86 | } 87 | ], 88 | "onEnter": [ 89 | "say #!builtin_text-UtDbfv" 90 | ], 91 | "onReceive": [], 92 | "type": "standard" 93 | }, 94 | { 95 | "id": "skill-cb04f5", 96 | "type": "skill-call", 97 | "skill": "Slot", 98 | "name": "Slot-cb04f5", 99 | "flow": "skills/Slot-cb04f5.flow.json", 100 | "next": [ 101 | { 102 | "caption": "On extracted", 103 | "condition": "temp.extracted == \"true\"", 104 | "node": "post-offline-message" 105 | }, 106 | { 107 | "caption": "On not found", 108 | "condition": "temp.notExtracted == \"true\"", 109 | "node": "post-offline-message" 110 | }, 111 | { 112 | "caption": "On already extracted", 113 | "condition": "temp.alreadyExtracted == \"true\"", 114 | "node": "post-offline-message" 115 | } 116 | ], 117 | "onEnter": null, 118 | "onReceive": null 119 | }, 120 | { 121 | "id": "43e490f234", 122 | "name": "post-offline-message", 123 | "next": [ 124 | { 125 | "condition": "true", 126 | "node": "offline_message_sent" 127 | } 128 | ], 129 | "onEnter": [ 130 | "rocketchat/omnichannel-offline-message {\"name\":\"{{session.visitor_info.name}}\",\"email\":\"{{session.visitor_info.visitorEmails.0.address}}\",\"message\":\"{{session.slots.offline_message.value}}\",\"department\":\"{{user.department}}\"}", 131 | "basic-skills/slot_reset {\"slotName\":\"offline_message\"}" 132 | ], 133 | "onReceive": null, 134 | "type": "standard" 135 | }, 136 | { 137 | "id": "047c3e3486", 138 | "name": "offline_message_sent", 139 | "next": [ 140 | { 141 | "condition": "session.offline_message_sent == true", 142 | "conditionType": "raw", 143 | "node": "offline_message_sent_feeback" 144 | }, 145 | { 146 | "condition": "true", 147 | "conditionType": "always", 148 | "node": "offline_message_error_feedback" 149 | } 150 | ], 151 | "onEnter": [], 152 | "onReceive": null, 153 | "type": "standard" 154 | }, 155 | { 156 | "id": "93e4d3a234", 157 | "name": "offline_message_sent_feeback", 158 | "next": [ 159 | { 160 | "condition": "true", 161 | "conditionType": "always", 162 | "node": "main.flow.json#menu" 163 | } 164 | ], 165 | "onEnter": [ 166 | "say #!builtin_text-1oqC1z" 167 | ], 168 | "onReceive": null, 169 | "type": "standard" 170 | }, 171 | { 172 | "id": "d24433404f", 173 | "name": "no-offline-message", 174 | "next": [ 175 | { 176 | "condition": "true", 177 | "conditionType": "always", 178 | "node": "Close-Room.flow.json" 179 | } 180 | ], 181 | "onEnter": [ 182 | "say #!builtin_text-9Ib6L5", 183 | "builtin/wait {\"delay\":\"6000\"}" 184 | ], 185 | "onReceive": null, 186 | "type": "standard" 187 | }, 188 | { 189 | "id": "7a409b924b", 190 | "name": "offline_message_error_feedback", 191 | "next": [ 192 | { 193 | "condition": "true", 194 | "conditionType": "always", 195 | "node": "main.flow.json#menu" 196 | } 197 | ], 198 | "onEnter": [ 199 | "say #!builtin_text-4x-hw2" 200 | ], 201 | "onReceive": null, 202 | "type": "standard" 203 | } 204 | ] 205 | } -------------------------------------------------------------------------------- /bot_lab/flows/Transfer-Room.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "2d51e5d276", 5 | "position": { 6 | "x": -125, 7 | "y": -35 8 | } 9 | }, 10 | { 11 | "id": "90ab7b245e", 12 | "position": { 13 | "x": 490, 14 | "y": -135 15 | } 16 | }, 17 | { 18 | "id": "ccf90981c5", 19 | "position": { 20 | "x": 485, 21 | "y": 15 22 | } 23 | }, 24 | { 25 | "id": "1455e690f5", 26 | "position": { 27 | "x": 160, 28 | "y": -70 29 | } 30 | }, 31 | { 32 | "id": "2fbaa1218e", 33 | "position": { 34 | "x": 815, 35 | "y": 25 36 | } 37 | }, 38 | { 39 | "id": "skill-cb04f5", 40 | "position": { 41 | "x": 1150, 42 | "y": 30 43 | } 44 | }, 45 | { 46 | "id": "43e490f234", 47 | "position": { 48 | "x": 1505, 49 | "y": -20 50 | } 51 | }, 52 | { 53 | "id": "047c3e3486", 54 | "position": { 55 | "x": 1805, 56 | "y": -25 57 | } 58 | }, 59 | { 60 | "id": "93e4d3a234", 61 | "position": { 62 | "x": 2185, 63 | "y": -135 64 | } 65 | }, 66 | { 67 | "id": "d24433404f", 68 | "position": { 69 | "x": 1119, 70 | "y": 214 71 | } 72 | }, 73 | { 74 | "id": "7a409b924b", 75 | "position": { 76 | "x": 2215, 77 | "y": 5 78 | } 79 | } 80 | ], 81 | "links": [ 82 | { 83 | "source": "047c3e3486", 84 | "sourcePort": "out1", 85 | "target": "7a409b924b", 86 | "points": [ 87 | { 88 | "x": 2005, 89 | "y": 49 90 | }, 91 | { 92 | "x": 2215, 93 | "y": 23 94 | } 95 | ] 96 | }, 97 | { 98 | "source": "047c3e3486", 99 | "sourcePort": "out0", 100 | "target": "93e4d3a234", 101 | "points": [ 102 | { 103 | "x": 2005, 104 | "y": 19 105 | }, 106 | { 107 | "x": 2185, 108 | "y": -117 109 | } 110 | ] 111 | }, 112 | { 113 | "source": "1455e690f5", 114 | "sourcePort": "out0", 115 | "target": "90ab7b245e", 116 | "points": [ 117 | { 118 | "x": 360, 119 | "y": 29 120 | }, 121 | { 122 | "x": 490, 123 | "y": -117 124 | } 125 | ] 126 | }, 127 | { 128 | "source": "1455e690f5", 129 | "sourcePort": "out1", 130 | "target": "ccf90981c5", 131 | "points": [ 132 | { 133 | "x": 360, 134 | "y": 60 135 | }, 136 | { 137 | "x": 485, 138 | "y": 33 139 | } 140 | ] 141 | }, 142 | { 143 | "source": "2d51e5d276", 144 | "sourcePort": "out0", 145 | "target": "1455e690f5", 146 | "points": [ 147 | { 148 | "x": 75, 149 | "y": 9 150 | }, 151 | { 152 | "x": 160, 153 | "y": -52 154 | } 155 | ] 156 | }, 157 | { 158 | "source": "2fbaa1218e", 159 | "sourcePort": "out1", 160 | "target": "d24433404f", 161 | "points": [ 162 | { 163 | "x": 1015, 164 | "y": 167 165 | }, 166 | { 167 | "x": 1120, 168 | "y": 231 169 | } 170 | ] 171 | }, 172 | { 173 | "source": "2fbaa1218e", 174 | "sourcePort": "out0", 175 | "target": "skill-cb04f5", 176 | "points": [ 177 | { 178 | "x": 1015, 179 | "y": 136 180 | }, 181 | { 182 | "x": 1150, 183 | "y": 48 184 | } 185 | ] 186 | }, 187 | { 188 | "source": "43e490f234", 189 | "sourcePort": "out0", 190 | "target": "047c3e3486", 191 | "points": [ 192 | { 193 | "x": 1705, 194 | "y": 102 195 | }, 196 | { 197 | "x": 1806, 198 | "y": -7 199 | } 200 | ] 201 | }, 202 | { 203 | "source": "ccf90981c5", 204 | "sourcePort": "out0", 205 | "target": "2fbaa1218e", 206 | "points": [ 207 | { 208 | "x": 685, 209 | "y": 102 210 | }, 211 | { 212 | "x": 815, 213 | "y": 43 214 | } 215 | ] 216 | }, 217 | { 218 | "source": "skill-cb04f5", 219 | "sourcePort": "out0", 220 | "target": "43e490f234", 221 | "points": [ 222 | { 223 | "x": 1350, 224 | "y": 74 225 | }, 226 | { 227 | "x": 1506, 228 | "y": -2 229 | } 230 | ] 231 | }, 232 | { 233 | "source": "skill-cb04f5", 234 | "sourcePort": "out1", 235 | "target": "43e490f234", 236 | "points": [ 237 | { 238 | "x": 1350, 239 | "y": 104 240 | }, 241 | { 242 | "x": 1506, 243 | "y": -2 244 | } 245 | ] 246 | }, 247 | { 248 | "source": "skill-cb04f5", 249 | "sourcePort": "out2", 250 | "target": "43e490f234", 251 | "points": [ 252 | { 253 | "x": 1350, 254 | "y": 135 255 | }, 256 | { 257 | "x": 1506, 258 | "y": -2 259 | } 260 | ] 261 | } 262 | ] 263 | } -------------------------------------------------------------------------------- /bot_lab/flows/error.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": {}, 4 | "startNode": "entry", 5 | "nodes": [ 6 | { 7 | "id": "3rr0r", 8 | "name": "entry", 9 | "onEnter": [], 10 | "onReceive": null, 11 | "next": [ 12 | { 13 | "condition": "true", 14 | "node": "error-handling" 15 | } 16 | ] 17 | }, 18 | { 19 | "id": "53a063076e", 20 | "name": "error-handling", 21 | "next": [ 22 | { 23 | "condition": "true", 24 | "node": "" 25 | } 26 | ], 27 | "onEnter": [ 28 | "say #!builtin_text-OC9rEB" 29 | ], 30 | "onReceive": null, 31 | "type": "standard" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /bot_lab/flows/error.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "3rr0r", 5 | "position": { 6 | "x": 80, 7 | "y": 90 8 | } 9 | }, 10 | { 11 | "id": "53a063076e", 12 | "position": { 13 | "x": 350, 14 | "y": 85 15 | } 16 | } 17 | ], 18 | "links": [ 19 | { 20 | "source": "3rr0r", 21 | "sourcePort": "out0", 22 | "target": "53a063076e", 23 | "points": [ 24 | { 25 | "x": 280, 26 | "y": 134 27 | }, 28 | { 29 | "x": 351, 30 | "y": 103 31 | } 32 | ] 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /bot_lab/flows/main.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": { 4 | "onReceive": [], 5 | "next": [] 6 | }, 7 | "startNode": "entry", 8 | "nodes": [ 9 | { 10 | "id": "entry", 11 | "name": "entry", 12 | "next": [ 13 | { 14 | "condition": "true", 15 | "node": "config-test" 16 | } 17 | ], 18 | "onEnter": [], 19 | "onReceive": null 20 | }, 21 | { 22 | "id": "c8598063d4", 23 | "name": "config-test", 24 | "next": [ 25 | { 26 | "condition": "true", 27 | "node": "get-initial-info" 28 | } 29 | ], 30 | "onEnter": [ 31 | "rocketchat/config-test {}" 32 | ], 33 | "onReceive": null, 34 | "type": "standard" 35 | }, 36 | { 37 | "id": "c9a2563efe", 38 | "name": "get-initial-info", 39 | "next": [ 40 | { 41 | "condition": "true", 42 | "conditionType": "always", 43 | "node": "menu" 44 | } 45 | ], 46 | "onEnter": [ 47 | "rocketchat/me-info {\"default_bot_name\":\"Unamed Bot\"}", 48 | "rocketchat/get-room-info {\"default_visitor_name\":\" Visitor\"}", 49 | "say #!builtin_text-KSaUnd", 50 | "rocketchat/omnichannel-visitor-info {\"visitor_token\":\"{{session.room_info.v.token}}\"}" 51 | ], 52 | "onReceive": null, 53 | "type": "standard" 54 | }, 55 | { 56 | "id": "41315e8f20", 57 | "name": "content-type-demo", 58 | "next": [ 59 | { 60 | "condition": "true", 61 | "conditionType": "always", 62 | "node": "menu" 63 | } 64 | ], 65 | "onEnter": [ 66 | "say #!builtin_text-kVsxXC", 67 | "say #!builtin_audio-5HHIUZ", 68 | "say #!builtin_card-y2rOio", 69 | "say #!builtin_image-IUrN-w", 70 | "say #!builtin_carousel-rqrWFl", 71 | "say #!dropdown-j1SKlD", 72 | "say #!builtin_file-f6njrS", 73 | "say #!builtin_location-y4cl3c", 74 | "say #!builtin_video-wOC24r" 75 | ], 76 | "onReceive": null, 77 | "type": "standard" 78 | }, 79 | { 80 | "id": "cf2d2fb28b", 81 | "name": "transfer-room", 82 | "next": [ 83 | { 84 | "condition": "true", 85 | "conditionType": "always", 86 | "node": "Transfer-Room.flow.json" 87 | } 88 | ], 89 | "onEnter": [ 90 | "builtin/setVariable {\"type\":\"user\",\"name\":\"department\",\"value\":\"t6Bpv2YugMzJCaxpY\"}" 91 | ], 92 | "onReceive": null, 93 | "type": "standard" 94 | }, 95 | { 96 | "id": "b6925ed72a", 97 | "name": "close-room", 98 | "next": [ 99 | { 100 | "condition": "true", 101 | "conditionType": "always", 102 | "node": "Close-Room.flow.json" 103 | } 104 | ], 105 | "onEnter": [], 106 | "onReceive": null, 107 | "type": "standard" 108 | }, 109 | { 110 | "id": "4146d9ea58", 111 | "name": "invalid-menu", 112 | "next": [ 113 | { 114 | "condition": "true", 115 | "conditionType": "always", 116 | "node": "menu" 117 | } 118 | ], 119 | "onEnter": [ 120 | "say #!builtin_text-R0538G" 121 | ], 122 | "onReceive": null, 123 | "type": "standard" 124 | }, 125 | { 126 | "id": "f331f15633", 127 | "name": "post-message", 128 | "next": [ 129 | { 130 | "condition": "true", 131 | "conditionType": "always", 132 | "node": "Post-Message.flow.json" 133 | } 134 | ], 135 | "onEnter": [ 136 | "rocketchat/team-post-message {\"channel\":\"#general\",\"message\":\"Rocket.Chat + Botpress = :hearts:\",\"message_extra\":\"\"}" 137 | ], 138 | "onReceive": null, 139 | "type": "standard" 140 | }, 141 | { 142 | "id": "8a3ab1d933", 143 | "name": "post-extended-message", 144 | "next": [ 145 | { 146 | "condition": "true", 147 | "conditionType": "always", 148 | "node": "Post-Message.flow.json" 149 | } 150 | ], 151 | "onEnter": [ 152 | "rocketchat/team-post-message {\"channel\":\"#general\",\"message\":\"[Rocket.Chat](https://rocket.chat) + [Botpress ](https://botpress.com/)= :hearts:\",\"message_extra\":\"{\\\"alias\\\":\\\"Ratatouille\\\",\\\"text\\\":\\\"Sample Extended message\\\",\\\"channel\\\":\\\"#general\\\",\\\"emoji\\\": \\\":hamster:\\\", \\\"parseUrls\\\": true,\\\"attachments\\\":[{\\\"author_name\\\":\\\"Duda Nogueira\\\",\\\"author_icon\\\":\\\"https://avatars.githubusercontent.com/u/1761174?v=4\\\",\\\"author_link\\\":\\\"https://github.com/dudanogueira\\\",\\\"collapsed\\\":true,\\\"color\\\":\\\"#79f756\\\",\\\"title\\\":\\\"First Attachment Title\\\",\\\"title_link_download\\\":true,\\\"title_link\\\":\\\"http://uol.com.br\\\",\\\"image_url\\\":\\\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Pearl_Winter_White_Russian_Dwarf_Hamster_-_Front.jpg/1920px-Pearl_Winter_White_Russian_Dwarf_Hamster_-_Front.jpg\\\",\\\"audio_url\\\":\\\"http://www.w3schools.com/tags/horse.mp3\\\",\\\"video_url\\\":\\\"http://www.w3schools.com/tags/movie.mp4\\\",\\\"text\\\":\\\":first_place: First Attachment Text\\\",\\\"fields\\\":[{\\\"short\\\":true,\\\"title\\\":\\\":point_right: First Field Title\\\",\\\"value\\\":\\\"Value of the first Field\\\"},{\\\"short\\\":true,\\\"title\\\":\\\":point_right: Second Field Title\\\",\\\"value\\\":\\\"Value of the second Field\\\"}]},{\\\"collapsed\\\":false,\\\"color\\\":\\\"#ffed2d\\\",\\\"text\\\":\\\":second_place: Second Attachment Text\\\",\\\"fields\\\":[{\\\"short\\\":false,\\\"title\\\":\\\"Not a short field, with some big texts to fill the whole line\\\",\\\"value\\\":\\\"Value of the first Field Attachment 2\\\"},{\\\"short\\\":true,\\\"title\\\":\\\"Second Field Title\\\",\\\"value\\\":\\\"Value of the 2nd Field\\\"},{\\\"short\\\":true,\\\"title\\\":\\\"Third Field Title\\\",\\\"value\\\":\\\"Value of the 3d Field\\\"}]},{\\\"collapsed\\\":false,\\\"color\\\":\\\"#1135ff\\\",\\\"text\\\":\\\":third_place: Third Attachment Text\\\"}]}\"}" 153 | ], 154 | "onReceive": null, 155 | "type": "standard" 156 | }, 157 | { 158 | "id": "skill-4af1b8", 159 | "type": "skill-call", 160 | "skill": "choice", 161 | "name": "menu", 162 | "flow": "skills/choice-4af1b8.flow.json", 163 | "next": [ 164 | { 165 | "caption": "User picked [1]", 166 | "condition": "temp['skill-choice-ret-5bo2n8wdha'] == \"1\"", 167 | "node": "content-type-demo" 168 | }, 169 | { 170 | "caption": "User picked [2]", 171 | "condition": "temp['skill-choice-ret-5bo2n8wdha'] == \"2\"", 172 | "node": "transfer-room" 173 | }, 174 | { 175 | "caption": "User picked [3]", 176 | "condition": "temp['skill-choice-ret-5bo2n8wdha'] == \"3\"", 177 | "node": "close-room" 178 | }, 179 | { 180 | "caption": "User picked [4]", 181 | "condition": "temp['skill-choice-ret-5bo2n8wdha'] == \"4\"", 182 | "node": "post-message" 183 | }, 184 | { 185 | "caption": "User picked [5]", 186 | "condition": "temp['skill-choice-ret-5bo2n8wdha'] == \"5\"", 187 | "node": "post-extended-message" 188 | }, 189 | { 190 | "caption": "On failure", 191 | "condition": "true", 192 | "node": "invalid-menu" 193 | } 194 | ], 195 | "onEnter": null, 196 | "onReceive": null 197 | }, 198 | { 199 | "id": "b41eadda3e", 200 | "name": "test-bench", 201 | "next": [ 202 | { 203 | "condition": "true", 204 | "conditionType": "always", 205 | "node": "END" 206 | } 207 | ], 208 | "onEnter": [ 209 | "rocketchat/omnichannel-visitor-info {\"visitor_token\":\"{{session.room_info.v.token}}\"}", 210 | "rocketchat/omnichannel-offline-message {\"name\":\"{{session.visitor_info.name}}\",\"email\":\"teste@teste.com\",\"message\":\"mensagem aqui\",\"department\":\"{{session.visitor_info.department}}\"}" 211 | ], 212 | "onReceive": null, 213 | "type": "standard" 214 | } 215 | ] 216 | } -------------------------------------------------------------------------------- /bot_lab/flows/main.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "entry", 5 | "position": { 6 | "x": -175, 7 | "y": -185 8 | } 9 | }, 10 | { 11 | "id": "c8598063d4", 12 | "position": { 13 | "x": 105, 14 | "y": -205 15 | } 16 | }, 17 | { 18 | "id": "c9a2563efe", 19 | "position": { 20 | "x": 350, 21 | "y": -280 22 | } 23 | }, 24 | { 25 | "id": "41315e8f20", 26 | "position": { 27 | "x": 1445, 28 | "y": -555 29 | } 30 | }, 31 | { 32 | "id": "cf2d2fb28b", 33 | "position": { 34 | "x": 1110, 35 | "y": -485 36 | } 37 | }, 38 | { 39 | "id": "b6925ed72a", 40 | "position": { 41 | "x": 1120, 42 | "y": -380 43 | } 44 | }, 45 | { 46 | "id": "4146d9ea58", 47 | "position": { 48 | "x": 1140, 49 | "y": 25 50 | } 51 | }, 52 | { 53 | "id": "f331f15633", 54 | "position": { 55 | "x": 1130, 56 | "y": -295 57 | } 58 | }, 59 | { 60 | "id": "8a3ab1d933", 61 | "position": { 62 | "x": 1135, 63 | "y": -160 64 | } 65 | }, 66 | { 67 | "id": "skill-4af1b8", 68 | "position": { 69 | "x": 695, 70 | "y": -305 71 | } 72 | }, 73 | { 74 | "id": "b41eadda3e", 75 | "position": { 76 | "x": 590, 77 | "y": -520 78 | } 79 | } 80 | ], 81 | "links": [ 82 | { 83 | "source": "41315e8f20", 84 | "sourcePort": "out0", 85 | "target": "skill-4af1b8", 86 | "points": [ 87 | { 88 | "x": 1645, 89 | "y": -112 90 | }, 91 | { 92 | "x": 1735, 93 | "y": 200 94 | }, 95 | { 96 | "x": 610, 97 | "y": 195 98 | }, 99 | { 100 | "x": 695, 101 | "y": -288 102 | } 103 | ] 104 | }, 105 | { 106 | "source": "4146d9ea58", 107 | "sourcePort": "out0", 108 | "target": "skill-4af1b8", 109 | "points": [ 110 | { 111 | "x": 1340, 112 | "y": 124 113 | }, 114 | { 115 | "x": 1340, 116 | "y": 200 117 | }, 118 | { 119 | "x": 610, 120 | "y": 195 121 | }, 122 | { 123 | "x": 695, 124 | "y": -288 125 | } 126 | ] 127 | }, 128 | { 129 | "source": "c8598063d4", 130 | "sourcePort": "out0", 131 | "target": "c9a2563efe", 132 | "points": [ 133 | { 134 | "x": 305, 135 | "y": -131 136 | }, 137 | { 138 | "x": 350, 139 | "y": -263 140 | } 141 | ] 142 | }, 143 | { 144 | "source": "c9a2563efe", 145 | "sourcePort": "out0", 146 | "target": "skill-4af1b8", 147 | "points": [ 148 | { 149 | "x": 550, 150 | "y": -55 151 | }, 152 | { 153 | "x": 695, 154 | "y": -288 155 | } 156 | ] 157 | }, 158 | { 159 | "source": "entry", 160 | "sourcePort": "out0", 161 | "target": "c8598063d4", 162 | "points": [ 163 | { 164 | "x": 25, 165 | "y": -141 166 | }, 167 | { 168 | "x": 105, 169 | "y": -188 170 | } 171 | ] 172 | }, 173 | { 174 | "source": "skill-4af1b8", 175 | "sourcePort": "out0", 176 | "target": "41315e8f20", 177 | "points": [ 178 | { 179 | "x": 895, 180 | "y": -261 181 | }, 182 | { 183 | "x": 1010, 184 | "y": -535 185 | }, 186 | { 187 | "x": 1445, 188 | "y": -538 189 | } 190 | ] 191 | }, 192 | { 193 | "source": "skill-4af1b8", 194 | "sourcePort": "out5", 195 | "target": "4146d9ea58", 196 | "points": [ 197 | { 198 | "x": 895, 199 | "y": -109 200 | }, 201 | { 202 | "x": 1141, 203 | "y": 42 204 | } 205 | ] 206 | }, 207 | { 208 | "source": "skill-4af1b8", 209 | "sourcePort": "out4", 210 | "target": "8a3ab1d933", 211 | "points": [ 212 | { 213 | "x": 895, 214 | "y": -139 215 | }, 216 | { 217 | "x": 1136, 218 | "y": -143 219 | } 220 | ] 221 | }, 222 | { 223 | "source": "skill-4af1b8", 224 | "sourcePort": "out2", 225 | "target": "b6925ed72a", 226 | "points": [ 227 | { 228 | "x": 895, 229 | "y": -200 230 | }, 231 | { 232 | "x": 1120, 233 | "y": -363 234 | } 235 | ] 236 | }, 237 | { 238 | "source": "skill-4af1b8", 239 | "sourcePort": "out1", 240 | "target": "cf2d2fb28b", 241 | "points": [ 242 | { 243 | "x": 895, 244 | "y": -231 245 | }, 246 | { 247 | "x": 1025, 248 | "y": -445 249 | }, 250 | { 251 | "x": 1111, 252 | "y": -468 253 | } 254 | ] 255 | }, 256 | { 257 | "source": "skill-4af1b8", 258 | "sourcePort": "out3", 259 | "target": "f331f15633", 260 | "points": [ 261 | { 262 | "x": 895, 263 | "y": -170 264 | }, 265 | { 266 | "x": 1130, 267 | "y": -278 268 | } 269 | ] 270 | } 271 | ] 272 | } -------------------------------------------------------------------------------- /bot_lab/flows/skills/Slot-cb04f5.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": { 4 | "next": [] 5 | }, 6 | "startNode": "check-if-extracted", 7 | "skillData": { 8 | "retryAttempts": 3, 9 | "contentElement": "builtin_text-OI_sY1", 10 | "notFoundElement": "builtin_text-OI_sY1", 11 | "turnExpiry": 2, 12 | "intent": "offline_message", 13 | "slotName": "offline_message", 14 | "entities": [ 15 | "any" 16 | ] 17 | }, 18 | "nodes": [ 19 | { 20 | "name": "slot-extract", 21 | "onEnter": [ 22 | "say #!builtin_text-OI_sY1 {}" 23 | ], 24 | "onReceive": [ 25 | "basic-skills/slot_fill {\"slotName\":\"offline_message\",\"entities\":\"any\", \"turnExpiry\":2}" 26 | ], 27 | "next": [ 28 | { 29 | "condition": "session.slots['offline_message'] && (temp.valid === undefined || temp.valid == \"true\")", 30 | "node": "extracted" 31 | }, 32 | { 33 | "condition": "true", 34 | "node": "not-extracted" 35 | } 36 | ], 37 | "id": "496014" 38 | }, 39 | { 40 | "name": "extracted", 41 | "onEnter": [ 42 | "builtin/setVariable {\"type\":\"temp\",\"name\":\"extracted\",\"value\":\"true\"}" 43 | ], 44 | "next": [ 45 | { 46 | "condition": "true", 47 | "node": "#" 48 | } 49 | ], 50 | "id": "897611" 51 | }, 52 | { 53 | "name": "not-extracted", 54 | "onEnter": [ 55 | "basic-skills/slot_not_found {\"retryAttempts\":\"3\"}", 56 | "say #!builtin_text-OI_sY1 {}", 57 | "builtin/setVariable {\"type\":\"temp\",\"name\":\"valid\",\"value\": \"true\"}" 58 | ], 59 | "onReceive": [ 60 | "basic-skills/slot_fill {\"slotName\":\"offline_message\",\"entities\":\"any\", \"turnExpiry\":2}" 61 | ], 62 | "next": [ 63 | { 64 | "condition": "session.slots['offline_message'] && (temp.valid === undefined || temp.valid == \"true\")", 65 | "node": "extracted" 66 | }, 67 | { 68 | "condition": "temp.notExtracted == \"true\"", 69 | "node": "#" 70 | }, 71 | { 72 | "condition": "true", 73 | "node": "not-extracted" 74 | } 75 | ], 76 | "id": "003411" 77 | }, 78 | { 79 | "name": "check-if-extracted", 80 | "onEnter": [ 81 | "basic-skills/slot_update_contexts {\"intentName\":\"offline_message\"}" 82 | ], 83 | "next": [ 84 | { 85 | "condition": "session.slots['offline_message'] !== undefined", 86 | "node": "already-extracted" 87 | }, 88 | { 89 | "condition": "true", 90 | "node": "slot-extract" 91 | } 92 | ], 93 | "id": "348680" 94 | }, 95 | { 96 | "name": "already-extracted", 97 | "onEnter": [ 98 | "builtin/setVariable {\"type\":\"temp\",\"name\":\"alreadyExtracted\",\"value\":\"true\"}", 99 | "builtin/setVariable {\"type\":\"temp\",\"name\":\"valid\",\"value\": \"true\"}" 100 | ], 101 | "next": [ 102 | { 103 | "condition": " (temp.valid === undefined || temp.valid == \"true\")", 104 | "node": "#" 105 | }, 106 | { 107 | "condition": "true", 108 | "node": "slot-extract" 109 | } 110 | ], 111 | "id": "107496" 112 | } 113 | ] 114 | } -------------------------------------------------------------------------------- /bot_lab/flows/skills/Slot-cb04f5.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "496014", 5 | "position": {} 6 | }, 7 | { 8 | "id": "897611", 9 | "position": {} 10 | }, 11 | { 12 | "id": "003411", 13 | "position": {} 14 | }, 15 | { 16 | "id": "348680", 17 | "position": {} 18 | }, 19 | { 20 | "id": "107496", 21 | "position": {} 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /bot_lab/flows/skills/choice-4af1b8.flow.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "catchAll": { 4 | "next": [] 5 | }, 6 | "startNode": "entry", 7 | "skillData": { 8 | "randomId": "5bo2n8wdha", 9 | "contentId": "builtin_single-choice-dYJNFS", 10 | "invalidContentId": "", 11 | "keywords": { 12 | "1": [ 13 | "1", 14 | "Content Type Demo" 15 | ], 16 | "2": [ 17 | "2", 18 | "Transfer Room" 19 | ], 20 | "3": [ 21 | "3", 22 | "Close Room" 23 | ], 24 | "4": [ 25 | "4", 26 | "Post Text Message to a Channel" 27 | ], 28 | "5": [ 29 | "5", 30 | "Post Extended Message to a Channel" 31 | ] 32 | }, 33 | "config": { 34 | "nbMaxRetries": 0, 35 | "repeatChoicesOnInvalid": true, 36 | "variableName": "" 37 | } 38 | }, 39 | "nodes": [ 40 | { 41 | "name": "entry", 42 | "onEnter": [ 43 | "say #!builtin_single-choice-dYJNFS {\"skill\":\"choice\"}" 44 | ], 45 | "next": [ 46 | { 47 | "condition": "true", 48 | "node": "parse" 49 | } 50 | ], 51 | "id": "674565" 52 | }, 53 | { 54 | "name": "parse", 55 | "onReceive": [ 56 | "basic-skills/choice_parse_answer {\"randomId\":\"5bo2n8wdha\",\"contentId\":\"builtin_single-choice-dYJNFS\",\"invalidContentId\":\"\",\"keywords\":{\"1\":[\"1\",\"Content Type Demo\"],\"2\":[\"2\",\"Transfer Room\"],\"3\":[\"3\",\"Close Room\"],\"4\":[\"4\",\"Post Text Message to a Channel\"],\"5\":[\"5\",\"Post Extended Message to a Channel\"]},\"config\":{\"nbMaxRetries\":0,\"repeatChoicesOnInvalid\":true,\"variableName\":\"\"}}" 57 | ], 58 | "next": [ 59 | { 60 | "condition": "temp['skill-choice-valid-5bo2n8wdha'] === true", 61 | "node": "#" 62 | }, 63 | { 64 | "condition": "true", 65 | "node": "invalid" 66 | } 67 | ], 68 | "triggers": [ 69 | { 70 | "conditions": [ 71 | { 72 | "id": "always" 73 | } 74 | ] 75 | } 76 | ], 77 | "onEnter": [], 78 | "id": "560961" 79 | }, 80 | { 81 | "name": "invalid", 82 | "onEnter": [ 83 | "basic-skills/choice_invalid_answer {\"randomId\":\"5bo2n8wdha\"}" 84 | ], 85 | "next": [ 86 | { 87 | "condition": "Number(temp['skill-choice-invalid-count-5bo2n8wdha']) > Number(0)", 88 | "node": "#" 89 | }, 90 | { 91 | "condition": "true", 92 | "node": "sorry" 93 | } 94 | ], 95 | "id": "379508" 96 | }, 97 | { 98 | "name": "sorry", 99 | "onEnter": [ 100 | "say #!builtin_single-choice-dYJNFS {\"skill\":\"choice\"}" 101 | ], 102 | "next": [ 103 | { 104 | "condition": "true", 105 | "node": "parse" 106 | } 107 | ], 108 | "id": "004370" 109 | } 110 | ] 111 | } -------------------------------------------------------------------------------- /bot_lab/flows/skills/choice-4af1b8.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": [ 3 | { 4 | "id": "674565", 5 | "position": {} 6 | }, 7 | { 8 | "id": "560961", 9 | "position": {} 10 | }, 11 | { 12 | "id": "379508", 13 | "position": {} 14 | }, 15 | { 16 | "id": "004370", 17 | "position": {} 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /bot_lab/intents/negative.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "negative", 3 | "utterances": { 4 | "en": [ 5 | "no", 6 | "not", 7 | "i dont want", 8 | "i don't want it", 9 | "no, thanks", 10 | "no way" 11 | ] 12 | }, 13 | "slots": [], 14 | "contexts": [ 15 | "global" 16 | ] 17 | } -------------------------------------------------------------------------------- /bot_lab/intents/offline_message.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "offline_message", 3 | "utterances": { 4 | "en": [ 5 | "[This is a message example](offline_message)", 6 | "[Another good example](offline_message)", 7 | "[Other text very good](offline_message)" 8 | ] 9 | }, 10 | "slots": [ 11 | { 12 | "id": "BjeGYIl5YdZOeSSpk1qfu", 13 | "name": "offline_message", 14 | "entities": [ 15 | "any" 16 | ], 17 | "color": 1 18 | } 19 | ], 20 | "contexts": [ 21 | "global" 22 | ] 23 | } -------------------------------------------------------------------------------- /bot_lab/intents/positive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "positive", 3 | "utterances": { 4 | "en": [ 5 | "yes", 6 | "sure", 7 | "ok", 8 | "I want", 9 | "okay", 10 | "okeydokey", 11 | "sure thing", 12 | "of course" 13 | ] 14 | }, 15 | "slots": [], 16 | "contexts": [ 17 | "global" 18 | ] 19 | } -------------------------------------------------------------------------------- /bot_lab/media/0rp0jq1h6biex8eg37e5-Audio record.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/0rp0jq1h6biex8eg37e5-Audio record.mp3 -------------------------------------------------------------------------------- /bot_lab/media/cmu80sglfgkh2pmchwi9-sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/cmu80sglfgkh2pmchwi9-sample.pdf -------------------------------------------------------------------------------- /bot_lab/media/p75uirqr6mdervuzfqpc-cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/p75uirqr6mdervuzfqpc-cat.png -------------------------------------------------------------------------------- /bot_lab/media/s5unl0x9mf0775ws05m5-Samsung_Galaxy_S7_edge_samples_(25504568010).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/s5unl0x9mf0775ws05m5-Samsung_Galaxy_S7_edge_samples_(25504568010).jpg -------------------------------------------------------------------------------- /bot_lab/media/see8z47e13k5o43aaovn-cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/see8z47e13k5o43aaovn-cat.png -------------------------------------------------------------------------------- /bot_lab/media/uvbmfc3mawbr8rffj0eg-movie.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/uvbmfc3mawbr8rffj0eg-movie.mp4 -------------------------------------------------------------------------------- /bot_lab/media/veo846xqa1xb2ui5as06-39603764921_71e4b52238_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RocketChat/rocketchat-botpress-lab-bot/905b8a14e73632f05b01b2cb20a83bb56f28c26b/bot_lab/media/veo846xqa1xb2ui5as06-39603764921_71e4b52238_b.jpg -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | volumes: 4 | mongodb_data: { driver: local } 5 | 6 | services: 7 | rocketchat: 8 | image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest} 9 | restart: on-failure 10 | labels: 11 | traefik.enable: "true" 12 | traefik.http.routers.rocketchat.rule: Host(`${DOMAIN}`) 13 | traefik.http.routers.rocketchat.tls: "true" 14 | traefik.http.routers.rocketchat.entrypoints: https 15 | traefik.http.routers.rocketchat.tls.certresolver: le 16 | environment: 17 | MONGO_URL: "${MONGO_URL:-\ 18 | mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\ 19 | ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}" 20 | MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\ 21 | -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\ 22 | local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}" 23 | ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}} 24 | PORT: ${PORT:-3000} 25 | DEPLOY_METHOD: docker 26 | DEPLOY_PLATFORM: ${DEPLOY_PLATFORM} 27 | OVERWRITE_SETTING_SMTP_Host: mailhog 28 | OVERWRITE_SETTING_SMTP_Port: 1025 29 | OVERWRITE_SETTING_Livechat_offline_email: central@email.com 30 | OVERWRITE_SETTING_From_Email: from@email.com 31 | OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enabled: false 32 | OVERWRITE_SETTING_Livechat_accept_chats_with_no_agents: true 33 | OVERWRITE_SETTING_Livechat_assign_new_conversation_to_bot: true 34 | OVERWRITE_SETTING_Livechat_clear_local_storage_when_chat_ended: true 35 | OVERWRITE_SETTING_Livechat_display_offline_form: true 36 | OVERWRITE_SETTING_UI_Allow_room_names_with_special_chars: true 37 | depends_on: 38 | - mongodb 39 | expose: 40 | - ${PORT:-3000} 41 | ports: 42 | - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}" 43 | 44 | mongodb: 45 | image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-4.4} 46 | restart: on-failure 47 | volumes: 48 | - mongodb_data:/bitnami/mongodb 49 | environment: 50 | MONGODB_REPLICA_SET_MODE: primary 51 | MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0} 52 | MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017} 53 | MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb} 54 | MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017} 55 | MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb} 56 | MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true} 57 | ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes} 58 | 59 | botpress: 60 | image: botpress/server:latest 61 | command: /botpress/bp --auto-migrate 62 | expose: 63 | - 3001 64 | environment: 65 | - DATABASE_URL=postgres://postgres:secretpw@postgres:5435/botpress_db 66 | - REDIS_URL=redis://redis:6379?password=redisPassword 67 | - EXTERNAL_URL=http://localhost:3001 68 | #- BP_MODULE_NLU_DUCKLINGURL=http://botpress_lang:8000 69 | #- BP_MODULE_NLU_LANGUAGESOURCES=[{"endpoint":"http://botpress_lang:3100"}] 70 | #- CLUSTER_ENABLED=true 71 | - BP_PRODUCTION=true 72 | - BPFS_STORAGE=database 73 | user: root 74 | depends_on: 75 | #- botpress_lang 76 | - postgres 77 | - redis 78 | volumes: 79 | - ./data/botpress/data:/botpress/data 80 | - ./actions/rocketchat:/botpress/data/global/actions/rocketchat 81 | ports: 82 | - "3001:3000" 83 | 84 | # botpress_lang: 85 | # image: botpress-lang 86 | # command: bash -c "./duckling -p 8000 & ./bp lang --langDir /botpress/lang --port 3100" 87 | # expose: 88 | # - 3100 89 | # - 8000 90 | # volumes: 91 | # - ./botpress/language:/botpress/lang 92 | 93 | postgres: 94 | image: postgres:14-alpine 95 | expose: 96 | - 5435 97 | ports: 98 | - "5435:5435" 99 | environment: 100 | PGPORT: 5435 101 | POSTGRES_DB: botpress_db 102 | POSTGRES_PASSWORD: secretpw 103 | POSTGRES_USER: postgres 104 | volumes: 105 | - ./data/botpress/db:/var/lib/postgresql/data 106 | 107 | redis: 108 | image: redis:7-alpine 109 | expose: 110 | - 6379 111 | command: redis-server --requirepass redisPassword 112 | volumes: 113 | - ./data/botpress/redisdb:/data 114 | 115 | mailhog: 116 | image: mailhog/mailhog:latest 117 | ports: 118 | - "8025:8025" 119 | --------------------------------------------------------------------------------