Connect a database from MongoDB Atlas
This guide will take you through all the neccessary steps needed to connect a database from a MongoDB Atlas account to Florentine.ai:
Create a readonly user
Start by logging in to your MongoDB Atlas account. Navigate to All Projects and select the project where the database you want to connect is located:

Next, navigate to Database & Network Access under the Security dropdown:

On the Database Users page, click on Add New Database User on the right:

In the opening modal for creating a new user, keep the default Password selection as Authentication Method.
In the Password Authentication section, create a username and a password. Make sure you copy the username and password, because you need it for the connection string later.
In the Database User Privliges section, select Only read any database option from the Built-in Role select.
Finally click on Add User.

Grant network access
Besides a user with database access Florentine.ai needs network access as well. Navigate to IP Access List under the Network Access dropdown and click on Add IP Address on the right:

In the opening modal you need to enter the Florentine.ai IP 167.99.246.57 inside the Access List Entry input.
Optionally you may also add a comment to help you identify this is the Florentine.ai IP address.
Finally click on Confirm:

For better failover security, we recommend adding the additional Florentine IP 209.38.238.253 as well.
Copy and modify connection string
Your final connection string must have the following structure:
mongodb+srv://<db_username>:<db_password>@<domain>/<db_name>For creating this string you can copy a connection string from your Altas account and modify it as follows:
In the main navigation, navigate to Clusters under the Database dropdown and, next to the cluster with the database you want to connect with Florentine.ai, click on Connect:

In the opening modal, click on Drivers in the Connect to your application section:

Copy the connection string found under the section 3. Add your connection string into your application code:

Now you should have a connection string that looks i.e. like this:
mongodb+srv://<db_username>:<db_password>@cluster.2mwtw.mongodb.net/?retryWrites=true&w=majority&appName=FlorentineIn order to connect with Florentine.ai you need to modify the connection string as follows:
Replace <db_username> and <db_password> with the values you copied when you created the readonly user earlier.
Add your database name after the cluster URI, so after the / and before the ? (in case you have query params in your copied connection string).
Please note
It is mandatory that you add your database name to the connection string, otherwise you will receive a No Database name provided error.
Your final connection string to add in your Florentine.ai account should now look comparable to this one:
mongodb+srv://user:[email protected]/samples