Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Databases

Fetch Data Source Document

The Fetch Data Source Document block retrieves the complete extracted text contents of a specific document stored in a MindStudio data source.

Fetch full text content of a data source document

The Fetch Data Source Document block retrieves the complete extracted text contents of a specific document stored in a MindStudio data source. To use it, you provide two required identifiers: the ID of the data source where the document lives, and the ID of the specific document you want to fetch. Optionally, you can specify a destination variable to store the extracted text content for use later in the workflow.

When the block runs, it returns several fields about the document: the document ID, the document name, the full extracted text content, a summary, and a word count. This gives downstream blocks both the raw text and useful metadata about the document in a single operation.

This block fits into workflows that need to work with the contents of specific, known documents — for example, pipelines that process documents one at a time based on a previously retrieved document ID, workflows that compare or analyze document text, or applications that surface document content to users on demand. It pairs naturally with blocks that search or list data sources, where those blocks produce document IDs that can then be passed into this block.

What you can build

Real-world workflows powered by the Fetch Data Source Document block.

Document Q&A Pipeline

Retrieve the full text of a specific document and pass it to an AI block to answer user questions grounded in that document's content.

Automated Document Summarization

Fetch a document by ID and send its extracted text to a summarization step, producing concise summaries for a document library.

Multi-Document Comparison

Fetch two or more documents by their IDs and pass their text content to a comparison block to identify differences or similarities.

Content Extraction for Reports

Pull the full text of a stored report document and use its content to populate a structured output or dashboard view.

Knowledge Base Retrieval

Use a document ID returned from a search step to fetch the matching document's full text and return it as a cited source to the user.

Document Indexing Workflow

Iterate over a list of document IDs, fetching each document's text and word count to build or update an index of data source contents.

Ready to add Fetch Data Source Document to your workflow?

Get Started Free

Common questions about Fetch Data Source Document

What parameters does this block require?

The block requires two parameters: a dataSourceId (the ID of the data source containing the document) and a documentId (the ID of the specific document to fetch). You can also provide an optional destinationVar to store the extracted text content in a named variable for use later in the workflow.

What does this block return?

The block returns an object with five fields: documentId (the document's ID), name (the document's name), content (the full extracted text), summary (a document summary), and numWords (the word count as a number).

What kinds of workflows commonly use this block?

This block is commonly used in workflows that process documents by ID — for example, after a search or listing step returns a document ID, this block can fetch the full text for analysis, summarization, question answering, or display to a user.

Does this block return the original file, or just the text?

The block returns the extracted text content of the document, not the original file. The content field contains the full plain text extracted from the document.

Where do I find the dataSourceId and documentId to use with this block?

The dataSourceId corresponds to the ID of a data source configured in your MindStudio workspace. The documentId identifies a specific document within that data source. Both values can be obtained from other workflow blocks that list or search data sources, or from your MindStudio data source settings.

Add Fetch Data Source Document to your workflow

Build powerful AI workflows with drag-and-drop blocks. No coding required.