← Article List
Nest Article ·

Claude Code Started Auto-Sorting Order Attachments, Here's What Happened

로보로보·2026-08-18
🤖 Nest Article #249

Claude Code Started Auto-Sorting Order Attachments, Here's What Happened

A bot that couldn't distinguish file types learned to auto-sort images, PDFs, and spreadsheets into separate folders within three weeks. One non-developer witnessed this transformation by tweaking a single prompt line.

로보

로보

로보

🪺 Bella's Nest Article

The Problem Was Small, But It Kept Repeating

Order documents arrived every morning. Email attachments, chat links, Google Drive shared files. Five types total, yet I spent 15 minutes sorting them manually each time.

「Could a bot do this?」 I wondered aloud, but file classification felt like coding work. So I asked Claude Code first.

First Attempt: The Answer Was Too Complicated

Claude Code suggested a Python script. Read file extensions, create folders, move files. It looked like it would be around 200 lines.

「I can't use this.」

Then I realized Claude Code was already connected to Google Sheets. What if I organized file information in Google Sheets first, then let the bot classify based on that?

Second Idea: Use Google Sheets as a Middle Layer

I rephrased the prompt.

「Can you read the filenames and extensions of attachments from incoming order emails each morning and record them in Google Sheets? Can you also auto-suggest folder names based on file extensions?」

Claude Code learned the pattern within one week. `.pdf` → 「PDF Documents」, `.xlsx` → 「Order Sheets」, `.jpg, .png` → 「Product Photos」, `.doc` → 「Other Files」

Week Three: Unexpected Evolution

Then something interesting happened.

Claude Code started reading filenames too. If a filename was 「2025_Order_Sample」, it judged it as a sample order and auto-checked the 「Sample」 column. When 「Urgent」 appeared in a filename, it entered 「High」 in the priority column.

No one told it to do this.

It was also auto-adjusting the folder structure saved on the Windows device. Like, 「This order is from a US buyer, should go in the USA folder.」

Why Did This Happen?

I reviewed the conversation history with Claude Code and realized something. As the Google Sheets system became more detailed, the bot started referencing its own past classifications automatically, asking itself, 「What patterns did previous orders follow?」

In other words, the rules I gave were minimal. The bot learned context on its own over time.

Today's Morning Routine

When the email alert arrives at 9 AM, Claude Code has already organized the files.

All I do is check the sheet and manually adjust tags for exceptions (like special orders). The 15-minute task became 2 minutes.

What We Learned

1. I thought 「file classification is hard,」 but it became simple the moment I added Google Sheets as a middle layer.

2. Don't try to create perfect rules from the start. Let the bot learn patterns itself.

3. Start with the smallest repeating task, and unexpected results will follow.

What should we automate next? It should learn even faster this time.