MongoDB
Full MongoDB integration for document operations — insert, query, update, delete, aggregate, and manage Atlas Search indexes directly from workflows.
Supported Operations
The MongoDB node provides two resource categories: document operations that work with individual collection records, and search-index operations that manage Atlas Search indexes.
Document Operations
Query documents matching a filter with optional projection, sort, limit, and skip. Returns an array of matching documents.
Insert one or many documents into a collection. Accepts a single document object or an array of documents for bulk inserts.
Update documents matching a filter using MongoDB update operators ($set, $push, $inc, $unset). Supports upsert and multi-document update.
Delete documents matching a filter. Supports single-document and multi-document deletion modes.
Atomically find a document and update it in one operation. Returns either the original or the updated document based on configuration.
Atomically find a document and replace its entire body in one operation. Useful for full document replacement workflows.
Execute a full MongoDB aggregation pipeline with any combination of stages: $match, $group, $lookup, $project, $sort, $limit, and custom $search stages for Atlas Search.
Search Index Operations
| Operation | Description |
|---|---|
list | List all Atlas Search indexes on a collection, including their names, statuses, and mapping definitions. |
create | Create a new Atlas Search index with a defined mapping for full-text and vector search capabilities. |
update | Update an existing Atlas Search index definition. Changes take effect asynchronously as MongoDB rebuilds the index. |
drop | Permanently delete an Atlas Search index by name from a collection. |
Business Use Cases
Workflow Execution Audit Trail
Insert a document at the end of every workflow run recording who triggered it, what inputs were provided, what decisions were made, and the final outcome. Query and aggregate this data for compliance reporting and process optimisation.
Customer Record Personalisation
Query customer profile documents at the start of a communication or onboarding workflow to retrieve preferences, purchase history, and tier. Use the returned fields to personalise message content, channel selection, and product recommendations.
Order Status Management
Update order documents atomically as they move through fulfilment stages. Use find-one-and-update to change status and return the updated document to trigger the next workflow step in a single round-trip.
Real-Time Sales Analytics
Run aggregation pipelines to compute daily or weekly revenue summaries, identify top-performing products, and produce regional breakdowns. Feed the results directly into report generation or BI dashboard update workflows.
Atlas Full-Text Search
Use the aggregate operation with a $search stage to power intelligent search across large document collections — find relevant articles, products, support tickets, or records by natural language query driven by workflow input.
Real-Time Inventory Management
Use $inc operators in update operations to decrement stock counts atomically when orders are placed. Use aggregation to identify items below reorder threshold to trigger automated procurement or supplier notification workflows.
Distributed Lock Management
Use find-one-and-update with an upsert pattern to implement distributed locks — acquire a lock document before a critical workflow section and delete it in a Finally Block to guarantee release regardless of success or failure.
credential_id referencing a MongoDB connection stored in BizFirst Credentials Manager. The connection string must include authentication details and, for Atlas clusters, the SRV hostname. See Configuration for setup details.