Inspiration
Small business owners, field coordinators, and freelancers store hundreds of invoices, delivery notes, and quotes on their NAS. Every week, manually opening unevenly named PDFs to type figures into spreadsheets wastes hours of productive time. While cloud AI tools can automate data extraction, uploading sensitive vendor pricing and client records to external servers introduces serious privacy risks. We built DocuFlow to bring automated document processing directly to the user's UGREEN AI NAS—keeping 100% of data local and secure.
What it does
DocuFlow is a Python-based Uliya Skill that reads unstructured business documents stored on a UGREEN AI NAS, extracts key fields into a unified CSV/Markdown summary, and organizes the files into clean, standardized folders (YYYY-MM-DD_Vendor_Type).
Main User Flow
- Ask: The user prompts Uliya to process a target folder (e.g., "Read this week's delivery notes in the inbox folder, update the master sheet, and sort them by vendor").
- Scan: DocuFlow scans the directory and extracts dates, vendor names, line items, and totals using the local AI model.
- Review (Human-in-the-Loop): Before modifying any files, it displays a preview table of the extracted data and proposed filenames for user approval.
- Apply: Once confirmed, it appends the structured records to the master CSV/Markdown report and safely moves the renamed files into their destination folders.
How we built it
Built with uliya-skill-kit, DocuFlow runs a three-stage asynchronous Python (asyncio) pipeline locally on UGOS:
- Scanner: Uses UGOS File & System CLI to inspect directory contents and filter valid document formats.
- Extractor: Leverages UGOS local document text extraction (
pypdf/ built-in tools) and the on-device AI model to parse unstructured text, strictly validating the JSON output schema with Pydantic. - Archiver: Uses UGOS File Operations CLI to create target directories, rename files, and generate CSV/Markdown summary logs.
UGREEN AI NAS Integration
- Step 1 (Scan): UGOS File & System CLI for safe metadata and directory reading.
- Step 2 (Extract): UGOS local text extraction and built-in LLM inference for zero-cloud parsing.
- Step 3 (Organize): UGOS File Operations CLI for deterministic folder creation and file routing.
Challenges & Safety Architecture
- Preventing AI Hallucinations & File Misrouting: Rather than letting a single AI prompt move or overwrite files directly, we enforced strict Pydantic schema validation and added a mandatory preview-and-confirm step before any file path changes occur.
- Data Loss Prevention: DocuFlow requests Read/Write permissions strictly on user-selected folders, and all file deletion commands are explicitly disabled in code. Unreadable or password-locked files are safely routed to a
_reviewfolder, and duplicate filenames receive a_v2suffix instead of overwriting existing records. - Hardware Resource Management: To prevent memory spikes on the NAS during large batch runs, we capped batch sizes per execution and relied on lightweight Python standard libraries over heavy external frameworks.
Current Status & What's Next
- Built:
uliya-skill-kitpackage structure, 3-stepasynciopipeline, Pydantic validation layer, and local unit tests using mock directories. - Next Steps & NAS Testing: We plan to validate processing throughput and memory footprint on the UGREEN AI NAS iDX6011 Pro, verify real-world UGOS folder permission rules, and expand support for scheduled background runs and complex multi-page tables.
Built With
- asyncio
- automation
- csv
- document-processing
- local-ai
- nas
- privacy
- pydantic
- pypdf
- python
- ugos
- ugreen
- uliya-skill-kit