MongoDB Extension for Blip April 22, 2024 13:31 Updated Index: Introduction How it works? Installation and Configuration User manual Dependencies Terms of Use Support Introduction The extension MongoDB for Blip was developed by the company Sharkdev. It is currently at version 1.0.0 and is available for subscription and use. The MongoDB for Blip extension was created to make life easier for developers who need to connect to a MongoDB database. No intermediate API! Now you can count on MongoDB for Blip. With this extension, you can connect Blip to your MongoDB database by providing the connection details, and you can start using it in Builder right away. It's easy and quick! Let's do it! This manual is intended to help Blip platform users with the installation, configuration, and use of the MongoDB for Blip extension. How it works? The MongoDB for Blip extension was designed to allow developers to access databases directly from Builder without the need for an intermediate API.The following features are offered: Connection to your own database; Execution of database commands through HTTP requests; Viewing the commands executed in the database in the last 30 days; Installation and Configuration To use the MongoDB for Blip extension, you need to access the contract where you want to install it and then access the Router bot. After that, navigate to the extensions section, which will open the Blip Store, and search for "MongoDB for Blip". Once found, you will need to activate it and install it. After activated, installed, and with terms accepted, a small configuration is necessary for you to start using it, follow the step by step below. Step 1) Connecting to the database On the extension's main page, enter name, host, user, and password in the connection form, then click "Connect". If the connection is successful, you will quickly see the message "Database connected". If unsuccessful, we suggest reviewing the connection data filled in the form. Step 2) Set token in bot configuration variables For your bot to be able to use the extension, it's necessary to provide the authorization token at the time of the request. * This step is not mandatory, but it's a suggestion aimed at maintaining Intelligent Contact. Step 3) Now just use it! In this step, the extension is configured and you can already use it. To do this, get to know the concept of commands in the “User Manual”. User manual Commands Like Blip, the way to communicate with the extension through Builder is by using Commands. Follow the instructions below: Basic data URL base: https://mongoforblip.blip.sharkdev.com.br/commands Authorization token: {{config.token}} or Authentication Header (Authorization) How to execute a command To execute a command, configure an HTTP Request, using the POST method, to the URL provided in Base URL, providing the Authorization token in the "Authorization" key of the Header. To make it easier, see the image below: Now, you need to define the Body of the request. To do this, the JSON sent must follow the attributes below: Attribute Type Mandatory Description collection string Yes The name of the collection where the command will be executed.Example: notes command object Yes List of methods to be executed, based on methods from MongoDB's Collection and Cursor.Example: { find: { group: 'example' }, sort: 'name'} apply boolean No Enables array-type methods to be passed as parameters to the method to be processed. Default: false Below are some examples of a request body. How to insert a document How to fetch a specific document How to list documents How to update a document How to delete a document How to sort a list of documents How to use ObjectId How to perform an aggregate Dependencies For this extension to work correctly, it is necessary to contract it through the Blip Store accessing Blip through a paying account. In addition, the use of its own database is required. Terms of Use The database accessed through this application belongs exclusively to the client; Request history to the database will be accessible for 30 days; SharkDev does not claim any ownership rights over the data stored in the client's database; Access data to the database (such as passwords, tokens, or authentication keys) are securely stored in our internal database; The client is responsible for configuring and managing the access levels of the database users; The client is solely responsible for the data trafficked, stored, or returned from the database; SharkDev assumes no responsibility for loss, corruption, or misuse of this data; We reserve the right to update or modify these Terms at any time; SharkDev is not responsible for the sharing of authentication keys to Blip when disclosed by the client; All information conveyed will be treated with absolute secrecy and confidentiality, solely and exclusively within your Blip environment and in accordance with the General Data Protection Law (Law No. 13,709/2018 - LGPD). Support If you have any questions or encounter any problems with the extension, please contact us via email blippartner@sharkdev.com.br or at +55 (35) 98802-9321. For more information, visit the discussion on the subject at our community or videos on our channel. 😃 Related articles Artificial intelligence engine STILINGUE How to publish your bot to Google Assistant How to Publish Your Bot on Microsoft Teams BLU - Blip Language Understanding MySQL for Blip Extension