| name | file-document |
| description | File documents from Downloads into organized Google Drive folders. Handles insurance paperwork, legal documents, medical records, and general documents. Uses predefined folder mappings for quick filing. |
Document Filing Workflow
This skill automates filing documents from your Downloads folder into your organized Google Drive structure. It handles insurance paperwork, legal documents, medical records, contracts, and general documents.
Prerequisites
This skill shares Google Drive credentials with the process-receipt skill. Ensure that skill is set up first:
- Google Drive API credentials configured
- Token authenticated via process-receipt setup
Folder Mappings
Insurance Documents
All insurance documents go to: Bold Conjectures / Insurance / {year}
| Year | Folder ID |
|---|
| 2020 | 1-J96f03jZQG3-Gg9Q-apB6aVLfvWJpjb |
| 2021 | 1-I7_z1cdo3iqD3nQrOvblvYwK7kyoMip |
| 2022 | 1-CAW2zW2O9UlUssIRNktWUo4ediHNh01 |
| 2023 | 1-GjSC4oV_WDCe7XNW8ExgkoQJk4YnUPK |
| 2024 | 1-KB6LR2LDohxvtPHLSJp0AP6uw0DuQKG |
| 2025 | 1yArsKB-wLG_54n9PIQoEAFTiAhQ1RIXn |
Insurance parent folder: 1wxaHeOrPlZ9VRASJikjVO38T04lCg06f
Medical Documents
All medical documents go to: Medical (root level)
- Folder ID:
1YA3u8i-0TWNYE4AnZhPPcOHmrPcaYN2S
Legal Documents
Personal legal documents go to: Legal (root level)
- Folder ID:
12oBWyhXvSUfYeb1T52ex_FQBnf-ZH4gM
Business legal documents go to: Bold Conjectures / Legal
- Folder ID:
1QEI3g85v0Ml9ElnwS0W-bX8mcXR-aARW
Other Important Folders
| Category | Folder | ID |
|---|
| Business (general) | Bold Conjectures | 14wGCI0ZqKLWLk_hTnnB_W6DD0lfZmn2I |
| ID Documents | ID's | 1Ct4lp3fOOB6LeZoi1ab22CY9NOanlqk0 |
| Global Entry | Global Entry | 1CuJM3qXI1fbBSftyqPx0GUGzec23kC2T |
| Taxes 2025 | Taxes 2025 | 1kMloTE-TB0SeqnwXYFfYfb6V7xgSyJhp |
Workflow Steps
1. Find Document in Downloads
Check ~/Downloads for recent PDF, image, or document files:
find ~/Downloads -type f \( -name "*.pdf" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.doc" -o -name "*.docx" \) -mtime -14 -print0 | xargs -0 ls -t 2>/dev/null | head -5
Show user the most recent files and let them choose which to file. If no documents found, inform user and exit.
2. Analyze Document Content
Read the document (PDF text extraction or image analysis) and identify:
- Document type (insurance, medical, legal, etc.)
- Date (if present)
- Organization/company name
- Document purpose
3. Determine Destination
Based on document analysis, determine the destination folder:
Insurance documents (policies, claims, EOBs, coverage letters):
Medical documents (lab results, prescriptions, provider letters):
- File to Medical folder:
1YA3u8i-0TWNYE4AnZhPPcOHmrPcaYN2S
Legal documents:
- Ask if business or personal using AskUserQuestion
- Business legal →
1QEI3g85v0Ml9ElnwS0W-bX8mcXR-aARW
- Personal legal →
12oBWyhXvSUfYeb1T52ex_FQBnf-ZH4gM
Tax documents:
- File to appropriate Taxes {year} folder in Bold Conjectures
ID/Identity documents:
- File to ID's folder:
1Ct4lp3fOOB6LeZoi1ab22CY9NOanlqk0
Other/Unknown:
- Use AskUserQuestion to ask where to file
- Present options: Medical, Legal (Personal), Legal (Business), Insurance, ID's, or "Let me specify"
4. Generate Filename
Create a clear, descriptive filename:
- Include date if available (YYYY-MM-DD format at the start)
- Include organization/source name
- Include document type/purpose
Filename patterns:
- Insurance:
2025-01-15-Aetna-EOB-Claim-12345.pdf
- Medical:
2025-02-20-LabCorp-Blood-Test-Results.pdf
- Legal:
2025-03-10-Contract-NDA-AcmeCorp.pdf
- Tax:
2025-W2-EmployerName.pdf
Rules:
- Use hyphens instead of spaces
- Remove special characters (/, :, etc.)
- Keep reasonably short but descriptive
5. Check for Duplicates
Before uploading, check existing files in the target folder:
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py list-files <folder_id>
If similar files exist (same date + similar name):
- Inform user of potential duplicate
- Show existing file(s) with view links
- Use AskUserQuestion:
- "Skip upload (duplicate)"
- "Upload anyway (different document)"
- "Let me check the existing file first"
6. Upload to Google Drive
Upload the document:
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py upload "<file_path>" "<folder_id>" "<filename>"
Display the result:
- Confirm upload success
- Show the full folder path
- Provide the view link
7. Clean Up
After successful upload:
- Ask user if they want to delete the original from Downloads
- If yes:
trash "<file_path>"
- If no: Leave in Downloads
8. Process More Documents (Optional)
If there were multiple recent documents in Downloads:
- Ask if user wants to file another document
- If yes, return to Step 1 with the next document
- If no, end workflow
Helper Script Commands
The gdrive_helper.py script (run with process-receipt venv) supports:
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py list-root
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py list-sub <parent_folder_id>
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py search <name_query>
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py path <folder_id>
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py find <parent_folder_id> <folder_name>
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py create <name> [parent_folder_id]
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py upload <file_path> <folder_id> [new_filename]
~/.claude/skills/process-receipt/venv/bin/python3 ~/.claude/skills/file-document/gdrive_helper.py list-files <folder_id>
Error Handling
- No documents found: Inform user, suggest checking Downloads manually
- Cannot read document: Ask user to describe the document type
- Upload fails: Check credentials, suggest re-running process-receipt setup
- Duplicate detected: Always ask user before skipping
Tips
- Use descriptive filenames - you'll thank yourself later when searching
- For insurance, always include the year in the document or filename
- Tax documents should include the tax year and document type (W2, 1099, etc.)