File Retriever
Turn uploaded files into accessible documents within your flow, with options for OCR and document processing strategies.

Component description
How the File Retriever component works
File Retriever Component
The File Retriever is a flow component designed to extract and convert the contents of files into structured documents, making them accessible for further processing in your AI workflows. This component is especially useful when you need to integrate knowledge from user-uploaded files or documents as part of your AI pipeline, such as for document analysis, summarization, or retrieval-augmented generation tasks.
What the Component Does
At its core, the File Retriever takes one or more file attachments and processes them to extract their textual content, transforming them into documents that can be used downstream in your workflow. It offers advanced options such as Optical Character Recognition (OCR) for image-based documents, customizable extraction strategies, and output token control.
Key Inputs
Input Name | Description | Type | Default / Options | Advanced |
---|---|---|---|---|
Files | Files to convert into documents. | FlowSessionAttachmentResponse | — (User uploads or provides files) | No |
Apply OCR | Apply OCR to extract text from image-based documents. Useful for scanned PDFs, images. | Boolean | false | Yes |
Max Tokens | Maximum number of tokens in the output text. Controls the size/length of extracted text. | Integer | 3000 | Yes |
Strategy | Strategy for transforming documents: - Concat documents, fill from first up to tokens limit - Include equal size from each documents | String (Dropdown) | Include equal size from each documents | Yes |
Tool Name | Optional name to refer to this tool in agent-based workflows. | String | — | Yes |
Tool Description | Optional description to help agents understand how to use this tool. | String (Multiline) | — | Yes |
Verbose | Whether to print verbose output (for debugging or detailed logs). | Boolean | false | Yes |
Outputs
The component provides multiple outputs to suit different downstream needs:
Output Name | Type | Description |
---|---|---|
Documents | Message | Processed documents as message objects, ready for workflow use. |
Raw Documents | Document | The raw extracted documents, giving you direct access to content. |
Tool | Tool | The documents made available as a tool for agent-based workflows. |
Why Use the File Retriever?
- Seamless Integration of File-Based Knowledge: Effortlessly bring content from uploaded files (PDFs, images, text, etc.) into your AI workflows.
- OCR Support: Automatically extracts text from images or scanned documents, expanding the range of usable file types.
- Flexible Extraction Strategies: Choose between concatenating documents or distributing content equally, with token limits to fit downstream model constraints.
- Agent-Ready: Optional fields for tool naming and description make it easy to reference in agent-driven processes.
- Customizable and Transparent: Advanced options for verbose output and token control help with debugging and optimizing workflow performance.
Typical Use Cases
- Knowledge Ingestion: Transforming user-provided documents into structured data for AI models.
- Document Analysis: Preparing documents for summarization, search, or question-answering tasks.
- Agent Tooling: Enabling AI agents to access documents as tools with clear descriptions and references.
This component provides a robust, flexible foundation for incorporating external file content into your AI-driven processes, enhancing the intelligence and adaptability of your workflows.
Examples of flow templates using File Retriever component
To help you get started quickly, we have prepared several example flow templates that demonstrate how to use the File Retriever component effectively. These templates showcase different use cases and best practices, making it easier for you to understand and implement the component in your own projects.
Frequently asked questions
- What does the File Retriever component do?
It allows you to upload files and automatically converts them into documents, which can then be used in your workflow for further processing or as knowledge sources.
- Can the File Retriever process image-based documents?
Yes, it supports OCR (Optical Character Recognition), enabling extraction of text from images within documents.
- How does the component handle multiple files or large documents?
You can configure strategies for document extraction, such as combining content or distributing text evenly, and set limits with max token options.
- What types of outputs are available from this component?
It can output processed documents in formats suitable for messaging, raw document use, or as tools for agents within your flow.
- Is technical expertise needed to use File Retriever?
No, the component is designed to be user-friendly, with configurable options for both basic and advanced needs.
Try FlowHunt File Retriever
Easily extract and process files as documents in your AI workflows. Explore the flexibility of the File Retriever component today.