Skip to main content
dewgo

Automation

Example. Pull line items off a PDF invoice

Accounts payable is the most automatable job in any small business. Vendor sends an invoice. A human reads it. A human types it into QuickBooks or a spreadsheet. The pattern is identical every time. Here is the working pipeline that takes the human out of the typing step, not the approving step.

5 min read · published May 21, 2026

The flow

Six steps. Triggered by a file landing in a watched Drive folder.

  • Trigger. New PDF in Google Drive folder "AP/incoming".
  • OCR. AWS Textract or Claude Vision reads the PDF and returns text plus table structure.
  • Extract. Claude Haiku 4.5 takes the OCR output and returns structured JSON: vendor, invoice number, date, line items, subtotal, tax, total.
  • Confidence check. Each field has a model confidence score. Anything under 80% routes to a Slack channel for human review.
  • Write. Each line item becomes a row in a Google Sheet. The full invoice gets a summary row. PDF is moved to "AP/processed" with the invoice number as the filename.
  • Notify. End-of-day digest with totals.

Tools and prices

AWS Textract: about 1.5 cents per page on the Tables API. A 2-page invoice runs about three cents.

Claude Haiku 4.5: about half a cent per invoice for the extraction step.

Google Drive plus Sheets API: free at this volume.

A no-code orchestrator: Make.com at $15 a month, or n8n self-hosted for $5 a month plus your own server.

Total per invoice: around four cents in cloud fees. A team handling 200 invoices a month spends $8 a month in raw costs.

Why two AI steps

Textract is great at reading the PDF. It is not great at understanding what the fields mean. Haiku is great at semantic extraction. It is not great at reading bad scans. Stack them and you get the OCR strength plus the semantic reasoning, with about a half-second of latency added.

Claude Vision can do both in one step, but it costs more and is harder to debug when a field comes back wrong. The two-step pipeline is what we use in production.

The human-in-the-loop step

Confidence under 80% on any field, the row goes to a Slack channel with the parsed JSON and a link to the original PDF. Approve and Edit buttons. The human spends 30 seconds confirming. The other 95% of invoices flow through without anyone touching them.

When this is worth doing

Around 30 invoices a month. Below that, the setup costs more than the time saved. Above that, every additional invoice is essentially free. We have a client doing 800 invoices a month who replaced two part-time AP coordinators with this pipeline plus one human reviewer.