Manual invoice processing costs Indian manufacturing firms an average of 18 minutes per invoice and carries a 3.4% error rate. We built an automated pipeline for a Coimbatore manufacturer that cut processing time to under 2 minutes per invoice and errors to near zero.
The Pipeline We Built
- Invoices arrive by email → Gmail webhook triggers a Python function
- PDF extracted and sent to Claude API for structured data parsing (vendor, amount, GST, line items)
- Extracted data validated against vendor master in ERPNext via REST API
- Matched invoices auto-posted to ERPNext as purchase invoices
- Exceptions (~8% of invoices) flagged to Slack for human review
What It Replaced
Three staff members previously spent 2+ hours daily on invoice entry. Post-automation, the same staff review the ~8% of exceptions — roughly 20 minutes per day total. The remaining time was reallocated to supplier relationship management and cost analysis.
Tech Stack Used
- Python 3.11 + FastAPI for the processing microservice
- Claude Haiku for cost-effective invoice extraction at scale
- ERPNext REST API for purchase invoice creation
- Slack webhooks for exception notifications
Start with the exception-handling flow before you build the happy path. Knowing how the system fails — and how staff respond — shapes the entire architecture.