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
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 shoud 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=FlorentineNow in 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.
Next, replace all query params, so everything from ? onwards, with your database name.
So your final connection string to add in your Florentine.ai account should look comparable to this one:
mongodb+srv://user:[email protected]/samples