Delete Data Source Document
The Delete Data Source Document block removes a specific document from a designated data source within MindStudio.
Delete a single document from a data source
The Delete Data Source Document block removes a specific document from a designated data source within MindStudio. It takes two required inputs: a data source ID identifying which data source to target, and a document ID identifying the exact document to remove. Once executed, the block returns both the data source ID and the document ID of the deleted record, confirming what was removed.
This block fits into workflows that need to manage the contents of a data source dynamically — for example, when records become outdated, when a user requests removal of their data, or when a pipeline needs to clean up temporary entries it previously created. Because the block targets a single document at a time, it is typically used in loops or conditional branches where specific document IDs have already been identified upstream.
The output of this block — the confirmed data source ID and document ID — can be passed to downstream blocks for logging, auditing, or triggering follow-up actions. It belongs to the Databases category and pairs naturally with blocks that query or list documents, since those blocks can supply the document IDs needed as input here.
What you can build
Real-world workflows powered by the Delete Data Source Document block.
Remove Expired Content Records
When a scheduled workflow detects that a document has passed its expiration date, this block removes it from the data source to keep the dataset current.
User Data Deletion Requests
When a user submits a request to delete their stored data, a workflow can locate the relevant document ID and use this block to remove it from the data source.
Pipeline Cleanup After Processing
After a workflow finishes processing a temporary document, this block deletes it from the data source to prevent accumulation of stale entries.
Duplicate Record Removal
A deduplication workflow can identify redundant document IDs and pass them to this block one at a time to remove duplicates from the data source.
Content Moderation Enforcement
When a moderation step flags a document as violating policy, this block removes it from the data source as part of an automated enforcement workflow.
Versioned Document Replacement
Before inserting an updated version of a document, a workflow uses this block to delete the old version, ensuring only the latest record exists in the data source.
Ready to add Delete Data Source Document to your workflow?
Get Started FreeCommon questions about Delete Data Source Document
What parameters does this block require?
The block requires two parameters: a data source ID (the ID of the data source containing the document) and a document ID (the ID of the specific document to delete). Both are strings and both must be provided for the block to execute.
What does this block return after execution?
The block returns an object containing two fields: the data source ID and the document ID of the deleted document. These can be used downstream for logging, auditing, or chaining additional workflow steps.
Can this block delete multiple documents at once?
No. The block is designed to delete a single document per execution. To delete multiple documents, you would need to run this block in a loop, passing a different document ID on each iteration.
What kinds of workflows commonly use this block?
This block is commonly used in data management workflows such as content expiration pipelines, user data deletion flows, deduplication routines, and post-processing cleanup steps where specific documents need to be removed from a data source.
How do I get the document ID needed as input?
The document ID is typically supplied by an upstream block that queries or lists documents in the data source. You would connect that block's output to this block's document ID input field within your workflow.
Related capabilities
Query Data Source
Search a vector data source (RAG) and return relevant document chunks.
Create Data Source
Create a new empty vector data source for the current app.
Delete Data Source
Delete a vector data source from the current app.
Upload Data Source Document
Upload a file into an existing data source from a URL or raw text content.
List Data Sources
List all data sources for the current app.
Fetch Data Source Document
Fetch the full extracted text contents of a document in a data source.
Add Delete Data Source Document to your workflow
Build powerful AI workflows with drag-and-drop blocks. No coding required.