Delete Many
AI-generatedSummary
Delete multiple documents from a specified MongoDB collection using a query filter.
Inputs
- Database (required) — The name of the MongoDB database where the target collection resides.
- Collection (required) — The name of the collection within the MongoDB database to delete documents from.
- Query (required) — One or more fields defining the filter to select which documents to delete. Each field consists of a key, type (String, Number, Boolean, DateTime, UUID), and value.
Output shape
a JSON array of objects, each indicating the number of documents deleted (property 'deleted') for each input item processed.
The operation processes all input items sequentially, applying the specified query filter to delete matching documents. If multiple input items are processed, each will produce an output object with the deleted count. Errors can be returned per item if continuation on failure is enabled.
Examples
Example 1: Delete all documents in the 'users' collection where 'status' equals 'inactive'.
Set 'Database' to your database name, 'Collection' to 'users', and add a 'Query' field with key 'status', type 'String', and value 'inactive'.