Skip to main content
The MongoDB node adds MongoDB operations to your workflows. Add it on the canvas or ask the AI builder for it by name, then pick an operation and fill in its fields.
You can wire the MongoDB node into an AI agent as a tool provider: the agent calls the operations you allow. See Agent tools.

Credentials

Connect MongoDB under Credentials in the node settings. See Connecting credentials for the general flow. Enter the values manually when creating the credential. Go to MongoDB Atlas → Database → Connect → Drivers, copy the connection string, and replace <password> with your database user password. For self-hosted MongoDB use mongodb://user:pass@host:27017/. Get your credentials here.

Operations

Aggregation

OperationIDDescription
Aggregateaggregate
OperationIDDescription
Atlas Facet Searchatlas_facet_search
Atlas Text Searchatlas_text_search
Create Atlas Search Indexcreate_atlas_search_index
OperationIDDescription
Create Vector Search Indexcreate_vector_search_index
Delete Search Indexdelete_search_index
List Search Indexeslist_search_indexes
Update Search Indexupdate_search_index
Upload & Index Documentupload_and_index
Vector Searchvector_search

Collections

OperationIDDescription
Create Collectioncreate_collection
Drop Collectiondrop_collection
List Collectionslist_collections
Rename Collectionrename_collection

Database

OperationIDDescription
Drop Databasedrop_database
List Databaseslist_databases
Run Commandcommand

Documents

OperationIDDescription
Bulk Writebulk_write
Count Documentscount_documents
Delete Many Documentsdelete_many
Delete One Documentdelete_one
Distinct Valuesdistinct
Estimated Document Countestimated_document_count
Find Documentsfind
Find One and Deletefind_one_and_delete
Find One and Replacefind_one_and_replace
Find One and Updatefind_one_and_update
Find One Documentfind_one
Insert Many Documentsinsert_many
Insert One Documentinsert_one
Replace One Documentreplace_one
Update Many Documentsupdate_many
Update One Documentupdate_one

Indexes

OperationIDDescription
Create Indexcreate_index
Create Multiple Indexescreate_indexes
Drop All Indexesdrop_indexes
Drop Indexdrop_index
List Indexeslist_indexes