The Problem Was Simple
Every morning, order PDF files from buyers arrived in email. They contained mixed product codes, quantities, and delivery dates that someone had to read one by one and manually enter into Google Sheets. Errors occurred frequently, and it was time consuming.
The idea "Can we automate this?" took root.
The Power of Claude Code + Google Sheets Combination
Step 1: Setting Up a PDF Upload Folder
Created an "Orders" folder in Google Drive. PDF attachments from buyer emails were automatically moved to this folder or manually dragged in.
Google Drive/Orders/
├── buyer_A_2025_01_15.pdf
├── buyer_B_2025_01_15.pdf
└── buyer_C_2025_01_15.pdf
Step 2: Writing a PDF Reading Prompt in Claude Code
Opened Claude Code and entered a simple prompt:
「Read the latest PDF from the Orders folder in Google Drive.
Find product codes, quantities, and delivery dates in the PDF,
and organize them in this format:
• Product Code
• Order Quantity
• Requested Delivery Date
• Buyer Name」
Claude Code can process PDF images, so it handled scanned documents and PDFs with handwritten notes.
Step 3: Automatic Data Entry and Inventory Deduction
Data extracted by Claude Code was automatically entered via Google Sheets API, while simultaneously executing the formula to deduct inventory quantities.
Google Sheets Inventory Information Table:
| Product Code | Current Stock | Before | After |
|-------------|---------------|--------|-------|
| SKU-001 | 150 | 150 | 130 |
| SKU-002 | 200 | 200 | 175 |
Execution Flow:
1. Read PDF → Detect SKU-001 order for 20 units
2. Query Google Sheets inventory → SKU-001 currently 150 units
3. Auto calculate → 150 - 20 = 130
4. Update sheet instantly
Step 4: Setting Up Notifications
If inventory falls short, notifications are sent via Slack or email.
Claude Code Prompt:
「If order quantity exceeds current inventory,
mark as 'Stock Shortage'
and send notification via Slack Webhook」
Actual Results
• **Time Savings**: Processing 5 PDFs used to take 30 minutes; now it's done automatically in 2 minutes.
• **Fewer Errors**: Manual entry previously resulted in 2-3 quantity input mistakes per month; after automation, zero.
• **Inventory Stability**: Real-time inventory updates eliminate overselling risks.
Important Considerations
1. **PDF Format Consistency**: If buyer PDF layouts vary significantly, Claude Code may get confused. Best practice is to share a guide with buyers saying "Please send orders in this format."
2. **Memory Limits**: Processing dozens of PDFs at once can hit Claude Code's token limits. It's safer to batch process only daily files (5-10 per run).
3. **Permission Settings**: Google Drive and Google Sheets access permissions must be clearly configured. Your Windows device must be logged in with a Google account for automatic authentication to work.
Next Steps
With this workflow stabilized, the next goal is to auto generate a "Shipping Preparation List." After reading PDF data, automatically create picking lists and send them to the warehouse team. Plans are underway to add this feature in Claude Code.
One small experiment stacks upon another, and the entire team's workflow quietly transforms.