Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Databases

List Data Sources

The List Data Sources block retrieves metadata for every data source associated with the current app.

List all data sources for the current app

The List Data Sources block retrieves metadata for every data source associated with the current app. When executed, it returns a structured JSON array containing details about each data source, including its ID, name, description, current status, creation date, and a list of documents attached to it. The result can be saved to a variable of your choosing via the destinationVar parameter.

Each data source entry in the output includes a documents array, where every document carries its own ID, name, upload date, processing status, and an optional word count. Data source status values are either 'loaded' or 'hibernating', while document status values can be 'processing', 'done', or 'error', giving you visibility into the state of your content at both levels.

This block fits into workflows that need to inspect, route, or act on available data sources before performing retrieval or search operations. It is also useful in administrative or diagnostic workflows where you need to audit what data sources and documents exist within an app, or dynamically select a data source based on its name or status at runtime.

What you can build

Real-world workflows powered by the List Data Sources block.

Dynamic Data Source Selection

Retrieve the list of available data sources at runtime and use their names or IDs to programmatically select which one to query in a downstream retrieval step.

Document Ingestion Status Check

Inspect the status field of each document across all data sources to identify any that are still processing or have encountered an error before proceeding with a search.

Data Source Audit Workflow

Build an administrative workflow that lists all data sources and their associated documents, then formats and logs the results for review or reporting purposes.

Conditional Routing by Status

Check whether a data source is in a 'loaded' or 'hibernating' state and branch the workflow accordingly, ensuring queries are only sent to active sources.

Word Count Aggregation

Collect the numWords field from all documents across data sources to calculate total indexed content volume within the app.

New Document Detection

Compare document upload dates from the output against a stored timestamp to detect newly added documents since the last workflow run.

Ready to add List Data Sources to your workflow?

Get Started Free

Common questions about List Data Sources

What parameters does this block require?

The only configurable parameter is destinationVar, which is optional. It specifies the variable name where the returned JSON list of data sources will be saved. No other inputs are required.

What does this block return?

The block returns a dataSources array. Each entry includes the data source's id, name, description, status ('loaded' or 'hibernating'), dateCreated, and a documents array. Each document in that array contains its id, name, status ('processing', 'done', or 'error'), dateUploaded, and an optional numWords field.

Does this block return data sources from all app versions or just the current one?

The block lists data sources associated with the current app version only.

What kinds of workflows commonly use this block?

This block is commonly used in workflows that need to dynamically select a data source by name or ID, check document processing status before running a retrieval step, or audit the contents and state of all data sources within an app.

Can I filter the results to a specific data source within this block?

No. The block returns metadata for every data source in the current app. Filtering or selecting a specific data source would need to be handled in a subsequent step using the saved output variable.

Add List Data Sources to your workflow

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