Invoice inbox → AI extraction → Google Sheets ledger (with vision fallback for scans) — free workflow

Sharing a workflow I built for my own bookkeeping: it turns an invoice inbox into a clean Google Sheets ledger.

Design decisions that might be useful even if you build your own:

1. Text first, vision second. PDF text extraction is nearly free, so the workflow tries that first and only falls back to a vision request when the text layer is empty (scanned docs). One IF node, big cost saving.

2. Confidence gating instead of blind trust. The model must return a confidence score; anything under 0.7 gets needs_review = YES in the sheet. In practice you review a small fraction of documents instead of checking everything.

3. Provider-agnostic LLM calls. The AI step is a plain HTTP Request node against an OpenAI-compatible endpoint with Header Auth, so OpenAI / OpenRouter / Azure / local all work by changing one URL.

Credentials used: IMAP, Header Auth, Google Sheets OAuth2. Import-and-run, placeholders documented.

Free download (workflow JSON + setup guide + ledger template): Email Invoice → Google Sheets AI Extractor (free n8n workflow)

Disclosure: my product page; the README mentions a paid extended pack. The free workflow is standalone. Feedback welcome — especially edge cases where the extraction fails, I’ll fold fixes back in.