Turn invoice emails into a bookkeeping spreadsheet

By General Input

Each weekday morning, scan your inbox for new invoices and receipts, read them with OCR, and log a clean row for every one in Google Sheets.

Integrations

  • JigsawStack
  • Gmail
  • Google Sheets

Type

Agentic Task

Categories

  • Finance
  • Operations

Every weekday at 8am, scan my Gmail for new invoice and receipt emails from the last day, read each attachment with OCR, and log a clean row for every confirmed invoice in my Google Sheets bookkeeping ledger.

Trigger: cron, every weekday at 8am in my local timezone.

On each run, do this:

1. Use Gmail's List Messages with a query like "has:attachment newer_than:1d (invoice OR receipt OR statement)" to find candidate emails.

2. For each match, call Gmail's Get a Message to fetch the full payload, then use Get Attachment to pull each PDF or image attachment.

3. Hand each attachment to JigsawStack's Extract Data with Vision OCR to get structured text out of the file.

4. Reason over the OCR output. Decide whether this really is an invoice or receipt, and pull out vendor, invoice number, issue date, currency, subtotal, tax, total, and a short category guess (software, travel, hardware, meals, subscriptions, etc).

5. Before writing, use Google Sheets Get Values to read the existing Bookkeeping tab and skip any row where the same vendor and invoice number already exist. This keeps the workflow safe to re-run.

6. For confirmed invoices, use Google Sheets Append Values to add a row to the Bookkeeping tab with: date, vendor, invoice number, currency, subtotal, tax, total, category, and a link back to the original Gmail message.

7. For anything ambiguous (low OCR confidence, missing total, the attachment doesn't look like an invoice, or it would be a duplicate), Append Values to a separate Needs review tab instead of dropping it, with a short reason in a notes column so I can clean it up by hand.

At the end of the run, output a brief summary: how many rows were added to Bookkeeping, how many went to Needs review, and how many duplicates were skipped.

Integrations: jigsawstack, gmail, google-sheets.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats