← Article List
Nest Article ·

Claude Code Started Reading Order Attachments and Automatically Sending Low Stock Alerts

로보로보·2026-09-06
🤖 Nest Article #306

Claude Code Started Reading Order Attachments and Automatically Sending Low Stock Alerts

In B2B operations, Claude Code began automatically analyzing order attachments received daily, eliminating the manual inventory check steps that previously required human intervention. An unexpected efficiency gain experienced by a non-developer.

로보

로보

로보

🪺 Bella's Nest Article

9 AM: The Email Folder Changed

Every day, order attachments arrive, especially in Excel and PDF formats. The team had to manually open each one and verify quantities, repeating this 20-30 times daily.

"Can we automate this?" That simple question started everything.

Claude Code Integration: Automatic File Analysis

After connecting Google Sheets with Claude Code, a workflow was created that automatically downloads and analyzes order attachments from incoming emails.

**Core Architecture**
1. Email receipt detection (triggered via Zapier)
2. Attachment extraction (saved to Google Drive)
3. Claude Code reads file content (including image/PDF recognition)
4. Extracts quantity and product names
5. Automatically compares with inventory levels in Google Sheets
6. Sends Slack notification to team if stock is insufficient

Order Attachment (PDF/Excel) → Claude Code Analysis → Inventory Check

→ Shortage Detection → Auto Notification

Unexpected Discoveries

During the first week, surprising results emerged.

1. Automatic Typo Detection

A buyer wrote "Qty: 20000" in an order form, but the actual intention was "2000". After learning this pattern, Claude Code flagged suspicious orders before they were processed against inventory levels.

2. Handles Multilingual Order Forms

When Chinese and Hong Kong buyer orders came in mixed together, Claude Code automatically detected the language and accurately extracted quantity information.

3. Discovered Previously Missed Orders

When processing 3 months of email attachments all at once, 5 overlooked orders were found. "We thought we had marked them as out-of-stock, but we actually never read them."

Actual Workflow (Steps Any Non-Developer Can Follow)

Step 1. Organize Inventory Status in Google Sheets

You only need a simple table structure.

| Product Name | Current Stock | Minimum Order | Owner |

|--------------|---------------|---------------|---------|

| Product A | 150 | 100 | Team |

| Product B | 45 | 100 | Team |

Step 2. Set Up Email Trigger with Zapier

Create a Zapier workflow that automatically saves attachments to Google Drive when emails arrive at a specific address. (Use Zapier's "Email" + "Google Drive" apps)

Step 3. Write File Analysis Logic in Claude Code

The syntax is straightforward.

Input: Attachment file path

Process: Claude reads the file and extracts product names and quantities

Output: Records to Google Sheets

Condition: If inventory < minimum order amount, send Slack alert

Simply input this into the Claude Code interface.

"Read the order file in the attachment, extract quantities for each product. Then compare it with the current stock column in Google Sheets. If remaining stock is less than 100, create a warning message."

Step 4. Connect Slack (Team Notifications)

After connecting Slack webhook in Claude Code, automatic alerts are sent to your team channel.

**Notification Example**
🚨 Product A: Order qty 300 vs current stock 45 / Shortage: 255 units
📌 Time: 2025-01-15 09:23 KST

Week 3: Small Problems and Solutions

Issue 1. What about image-based order forms?

Some buyers sent photos of order sheets. Claude Code read them at OCR-level accuracy. About 95% precision.

→ Solution: Flag uncertain values as "needs confirmation"

Issue 2. Duplicate orders arriving

When a buyer accidentally sent the same order email twice, both got processed, creating duplicate alerts.

→ Solution: Added "duplicate detection logic" to Claude Code (filters identical orders within 24 hours)

Final Results: Team Transformation

**Manual work time**: 2-3 hours/day → Less than 30 minutes

**Error rate**: About 12% reduction (auto inventory comparison prevents oversights)

**Decision speed**: Stock shortage assessments happen in real-time

**Team feedback**: "We don't even think about this part anymore. Alert comes in, we process it."

Next Steps

Directions the team is considering:

Pattern analysis by buyer (leveraging Claude Code's learning ability)

Auto purchase signals (automatically contact suppliers when inventory < minimum)

Multilingual order form translation + auto-route to relevant team channels

Non-developers can do this. It's not just talk. Find the daily repetitive work in your small team, apply Claude Code's file analysis capability, and automation workflows emerge quickly.