cd /news/artificial-intelligence/extracting-invoices-from-whatsapp-ph… · home topics artificial-intelligence article
[ARTICLE · art-56058] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

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.

read1 min views1 publishedJul 12, 2026

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.

Built by the MageSheet team.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @magesheet 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/extracting-invoices-…] indexed:0 read:1min 2026-07-12 ·