# MongoDB

### [Listing of all MongoDB Actions](https://github.com/unskript/docs/blob/main/connnecting/connectors/mongodb/action_mongo/README.md)

### Authentication

![Information needed to onboard Mongo DB connector](/files/O8EBdrQYcTF1lVDCnm3c)

You will need to supply either a username/password, or a public/private API keys.

[If you are using Atlas, see instructions below the table.](#using-atlas)

| Name                  | Description                                                                              |
| --------------------- | ---------------------------------------------------------------------------------------- |
| Name                  | This credential will be listed using the name you provide                                |
| Host                  | Full MongoDB URI, in addition to simple host name. It also supports mongodb+srv:// URI's |
| Username              | Username to authenticate with MongoDB                                                    |
| Password              | Password to authenticate with MongoDB                                                    |
| Port                  | Port on which MongoDB server is listening                                                |
| Atlas API Public Key  | The public key acts as the username when making API requests                             |
| Atlas API Private Key | The private key acts as the password when making API requests                            |

### Using Atlas

#### Connect

Under DEPLOYMENT, click Database\
![](/files/M7aa7DE6J0a6s3CcWKKl)

On this page, click the COnnect button, and then the Drivers:\
\
![](/files/GhHGpBtpBcRpHMadfpnU)

![](/files/f5CCEtvR604kA0IL4UUo)

This page will show you the URI to add:

<figure><img src="/files/C5MlYS5IaCyYPeSQ7I11" alt=""><figcaption></figcaption></figure>

Enter mongodb+srv://\<the URL after the @> into your credential

#### Create Users

In your dashboard, create a user by clicking "Database Access" under SECURITY. Here you can add and remove users, and retrieve the password for your users.\
![](/files/Q2LWFqLSe7gXSvWomM33)

#### Access

Finally, enter the NAT Gateway for your unSkript installation in the Network Access section, so that unSkript is allowed to connect to Atlas.

![](/files/WscyJp9w8DcCp0OtuRHq)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.unskript.com/unskript-documentation/connnecting/connectors/mongodb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
