Extracting Invoices From WhatsApp Photos With AI Vision (Apps Script + Google Sheets) The MageSheet team built a pipeline that uses AI vision models to extract invoice data from WhatsApp photos and write it to Google Sheets. The system routes images through models like Gemini, Claude Vision, or GPT-4 Vision, returning structured JSON with a confidence score, and auto-appends high-confidence entries to a ledger while flagging lower-confidence ones for review. At $40–100/month, it replaces a manual process costing $2,000–4,000/month in labor. Every logistics and field-sales team runs the same expensive process: a driver photographs a receipt into a WhatsApp group, and a back-office clerk manually types the invoice number, total, and date into a spreadsheet. Hundreds of receipts a week = transcription errors and thousands of wasted hours. AI vision models kill that bottleneck. Here's the pipeline that turns a blurry field photo into clean structured data in seconds. OCR reads characters. Modern vision models Claude Vision, Gemini Vision, GPT-4 Vision read structure — they distinguish a tax ID from a total, and a date from an amount, even on crumpled, angled, or poorly lit receipts. No brittle per-vendor parsers. WhatsApp image → Apps Script doPost → forward to vision model → model returns JSON { InvoiceNumber, TotalAmount, VendorName, Date, Category, confidence score } → confidence routing: 90 → auto-append to ledger 70–90 → flag for human review < 70 → ask driver to re-photo → write row to Google Sheet + link to original image → auto WhatsApp confirmation to driver The confidence score is the whole trick — it's what stops bad extractions from silently polluting your ledger. Pattern: Gemini for the first pass, escalate only low-confidence cases to Claude / GPT-4o. ~500 receipts/week: vision API $10–40 + WhatsApp API $30–60 + Apps Script free = ~$40–100/month . Versus a clerk at ~25 hrs/week = $2,000–4,000/month in loaded labor. Per-receipt cost: $0.005–0.02 compress images to ~1024px to cut it further . Accuracy: 92–97% on legible receipts, 75–85% on handwritten/damaged — hence the confidence routing. The complete pipeline, categorization, and privacy controls are in the full guide on the MageSheet blog https://magesheet.com/blog/extracting-invoices-via-whatsapp-ai-vision . Built by the MageSheet team.