Upload Data Source Document
The Upload Data Source Document block adds a document to an existing data source, either by downloading a file from a URL or by converting a raw text string into a .
Upload files or text into a data source
The Upload Data Source Document block adds a document to an existing data source, either by downloading a file from a URL or by converting a raw text string into a .txt file. You specify the target data source using its ID, provide the file content or URL, and assign a display name for the document. An optional destination variable lets you capture the resulting document ID for use later in the workflow.
The block returns three output fields: the ID of the uploaded document, the ID of the data source it was added to, and the resolved file name. These outputs can be passed to downstream blocks that need to reference the document or confirm where it was stored.
This block fits into workflows that need to populate or update a data source dynamically — for example, ingesting user-submitted content, pulling in documents from external URLs, or programmatically building up a knowledge base that other blocks can then query.
What you can build
Real-world workflows powered by the Upload Data Source Document block.
Ingest User-Submitted Files
When a user provides a file URL through a form or chat input, use this block to download and store it in a data source for later retrieval or search.
Build a Knowledge Base
Programmatically add documents from a list of URLs to a data source, assembling a searchable knowledge base as part of an automated setup workflow.
Store AI-Generated Content
After a text generation block produces a summary or report, upload that raw text as a document to a data source so it can be queried in future sessions.
Sync External Documentation
Pull documentation pages or release notes from external URLs and upload them into a data source to keep a reference library current.
Archive Conversation Transcripts
At the end of a workflow, convert a conversation transcript into a text document and upload it to a data source for record-keeping or analysis.
Populate Per-User Data Sources
In multi-user applications, upload user-specific documents into dedicated data sources so that retrieval blocks return only that user's relevant content.
Ready to add Upload Data Source Document to your workflow?
Get Started FreeCommon questions about Upload Data Source Document
What are the required parameters for this block?
Three parameters are required: dataSourceId (the ID of the target data source), file (either a URL to download or raw text content to upload as a .txt file), and fileName (the display name for the document). A fourth parameter, destinationVar, is optional and lets you save the uploaded document's ID to a variable.
What does the block return?
The block outputs three fields: documentId (the ID assigned to the uploaded document), dataSourceId (the ID of the data source it was added to), and fileName (the resolved display name of the document).
How does the block handle the file parameter — does it behave differently for URLs versus plain text?
If the file parameter is a URL, the block downloads the file from that URL and uploads it. If the file parameter is any other string, the block treats it as raw text content and creates a .txt document from it before uploading.
Does the block wait for the document to finish processing before the workflow continues?
Yes. The block waits for document processing to complete before transitioning to the next step, polling for up to 5 minutes.
What kinds of workflows commonly use this block?
This block is used in workflows that need to dynamically populate a data source — such as ingesting user-submitted files, archiving generated text, syncing external documents from URLs, or building knowledge bases that downstream retrieval or search blocks can query.
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.
List Data Sources
List all data sources for the current app.
Delete Data Source Document
Delete a single document from a data source.
Fetch Data Source Document
Fetch the full extracted text contents of a document in a data source.
Add Upload Data Source Document to your workflow
Build powerful AI workflows with drag-and-drop blocks. No coding required.