> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unmanaged MongoDB

> Connect to externally managed MongoDB instances as a data source in FlowX workflows.

## Overview

Unmanaged MongoDB is a data source type that lets you connect FlowX workflows to **external MongoDB databases that your organization manages independently**. Unlike the built-in [FlowX Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/flowx-database.md) — which provisions and manages MongoDB collections automatically — Unmanaged MongoDB connects to existing databases and collections you control.

> [card] Use your infrastructure
>
> Connect to MongoDB instances you already manage, including Atlas, self-hosted, or cloud-managed deployments

> [card] Same operations
>
> Use the same CRUD operations (find, insert, update, delete) as FlowX Database

> [card] Connection discovery
>
> Browse available databases and collections directly from the Designer after connecting

> [card] Connection pooling
>
> Configure pool size, idle timeouts, and maintenance frequency per data source

***

## Managed vs unmanaged MongoDB

| Aspect | FlowX Database (managed) | Unmanaged MongoDB |
| - | - | - |
| **Collection creation** | Automatic — FlowX creates and manages collections | Manual — you provide an existing collection |
| **Schema management** | Defined in FlowX Designer | Optional — you manage schemas externally |
| **Index management** | CRUD via Designer UI | You manage indexes externally |
| **Connection** | Internal, handled by FlowX | You provide a connection URI |
| **Auth** | Internal | Username/password (SCRAM-SHA-256), or credentials embedded in the connection URI |
| **Use case** | Data sharing between FlowX processes | Integrate with existing MongoDB infrastructure |

> [!TIP]
>
> Use **FlowX Database** when you need FlowX to manage the full lifecycle of your data. Use **Unmanaged MongoDB** when you need to read from or write to databases that exist outside FlowX.

> [!NOTE]
>
> Both [FlowX Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/flowx-database.md) (managed) and Unmanaged MongoDB are served by the same **nosql-db-runner** service. Managed collections are stored in nosql-db-runner's own MongoDB database, while an Unmanaged MongoDB data source opens a separate, isolated connection to the external instance you specify — it never touches nosql-db-runner's internal database. Point it at infrastructure you own and manage.

***

## Prerequisites

* A MongoDB 6.0+ instance accessible from your FlowX deployment
* An existing database and collection on the target instance
* A MongoDB user with appropriate permissions (read, write, or both)
* Network connectivity between FlowX services and the MongoDB instance
* For TLS/SSL connections: appropriate certificates configured on the MongoDB instance

***

## Creating an Unmanaged MongoDB data source

![Unmanaged MongoDB data source configuration](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/unmanaged_mongo.png)

**1. Open Data Sources**

Navigate to **Integrations** → **Data Sources** in your project.

**2. Create a new data source**

Click **New Data Source** and select **Unmanaged MongoDB** as the type.

**3. Configure the connection**

Enter the MongoDB connection URI:

```
mongodb+srv://username:password@cluster.example.net
```

Or standard format:

```
mongodb://username:password@host:27017
```

**4. Test the connection**

Click **Test Connection** to verify connectivity and credentials.

**5. Select database and collection**

After a successful connection test, browse available databases and select the target database. Then browse and select the target collection.

**6. Configure authorization (optional)**

In the **Authorization** tab, configure authentication if not embedded in the connection URI.

**7. Save**

Click **Save** to create the data source.

> [!WARNING]
>
> The target collection must already exist on the MongoDB instance. FlowX does not create collections on unmanaged databases.

***

## Connection pool configuration

Each Unmanaged MongoDB data source has its own connection pool. You can tune pool settings in the data source **Settings** tab:

| Setting | Description | Default |
| - | - | - |
| **Min pool size** | Minimum number of connections maintained | `0` |
| **Max pool size** | Maximum number of concurrent connections | `100` |
| **Max idle time** | How long an idle connection stays open | `60000` ms (1 min) |
| **Max lifetime** | Maximum lifetime of a connection | `0` (unlimited) |
| **Wait queue timeout** | How long a request waits for an available connection | `120000` ms (2 min) |
| **Maintenance frequency** | How often the pool checks for idle connections to close | `60000` ms (1 min) |

> [!TIP]
>
> For production workloads, set **Min pool size** to match your baseline concurrent usage to avoid connection warm-up latency.

***

## Operations

Unmanaged MongoDB supports the same operations as [FlowX Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/flowx-database.md):

| Operation | Description |
| - | - |
| `find` | Retrieve multiple documents based on criteria |
| `findOne` | Retrieve a single document |
| `insertOne` | Add a single document |
| `insertMany` | Add multiple documents at once |
| `updateOne` | Modify a single document |
| `updateMany` | Modify multiple documents at once |
| `deleteOne` | Remove a single document |
| `deleteMany` | Remove multiple documents at once |

Operations are configured the same way as FlowX Database operations — with filters, projections, sorting, and parameter substitution using `${paramName}` syntax. You can test operations directly in the Designer before using them in workflows.

`updateOne`, `updateMany`, `deleteOne`, and `deleteMany` operations with a missing or empty filter are rejected. To match every document on purpose, use the filter `{"_id": {"$exists": true}}`.

The **Documents** tab on the data source page lets you browse documents in the collection with pagination, filtering, and sorting.

For details on configuring each operation, see the [FlowX Database operations documentation](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/flowx-database.md#mongodb-operations-supported).

***

## Using in workflows

Unmanaged MongoDB data sources are used in workflows the same way as other data sources:

**1. Create operations**

Define operations on the data source (find, insert, update, delete).

**2. Add a Data Source node**

Add a **Data Source** node to your workflow.

**3. Select the data source**

Select the Unmanaged MongoDB data source and operation.

**4. Map parameters**

Map input/output parameters in the data mapper.

***

## Deployment

No additional microservices are required. Unmanaged MongoDB uses the existing **nosql-db-runner** service to execute operations against your external MongoDB instance.

Ensure the `nosql-db-runner` service has network access to your MongoDB instance. If your MongoDB is behind a firewall, configure the appropriate network rules.

***

## Related resources

> [card] [FlowX Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/flowx-database.md)
>
> Managed MongoDB data storage within FlowX

> [card] [Integration Designer](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/integration-designer.md)
>
> Overview of all data source types and workflow building

> [card] [NoSQL DB Runner setup](https://docs.flowx.ai/6.x/setup-guides/nosql-db-runner.md)
>
> Deployment configuration for the database runner service


## Related topics

- [FlowX.AI 5.6.0 Release Notes](https://docs.flowx.ai/release-notes/v5.x/v5.6.0-march-2026/v5.6.0-march-2026.md)
- [FlowX.AI 5.9.0 Release Notes](https://docs.flowx.ai/release-notes/v5.x/v5.9.0-june-2026/v5.9.0-june-2026.md)
- [Deployment guidelines v6.0.0](https://docs.flowx.ai/release-notes/v6.x/v6.0.0-october-2026/deployment-guidelines-v6.0.md)
- [Oracle Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/oracle-database.md)
- [PostgreSQL Database](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/postgresql-database.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.