Log invoices from any mailbox to Google Sheets

By General Input

Every 4 hours, pull new invoices and receipts from your inbox, extract vendor and totals, and log a clean row in Google Sheets. Works with Gmail, Outlook, Exchange, iCloud, and IMAP.

Integrations

  • Aurinko
  • Google Sheets

Type

Agentic Task

Categories

  • Finance
  • Operations

Build me a bookkeeping helper that turns invoice and receipt emails into rows in a Google Sheet.

Trigger: cron, every 4 hours.

On each run, do this:

1. Call Aurinko List Email Messages to find recent messages from roughly the last 6 hours that look like invoices or receipts. Use search terms like "invoice", "receipt", "order confirmation", "payment", plus any known vendor domains I've configured. Aurinko is a single connection that works for Gmail, Outlook, Office 365, Exchange, iCloud, and IMAP, so this workflow does not depend on the underlying provider.

2. For each candidate message, call Aurinko Get Email Message to pull the full body and any attachment metadata.

3. Extract structured fields from the message body and, when available, the content of any PDF or image attachment. The fields I need are: vendor name, invoice number, invoice date, currency, subtotal, tax, total, payment method, and a short one-line description of what was purchased.

4. Skip anything that is clearly a marketing email, newsletter, shipping notification, or an unpaid quote. Only real paid invoices and confirmed receipts should proceed.

5. Deduplicate on invoice number plus vendor. Before writing a row, check whether the same vendor and invoice number are already in the sheet and skip if so, so re-runs never double-book the same receipt.

6. For every extracted invoice, call Google Sheets Append Values on my designated Expenses tab, writing one row per invoice with these columns: vendor name, invoice number, invoice date, currency, subtotal, tax, total, payment method, one-line description, source email subject, and source email message id so a human can click back to the original.

At the end of each run, print a short summary: how many candidate messages were found, how many invoices were extracted, how many rows were appended, and how many were skipped as duplicates or non-invoices.

Integrations: aurinko, google-sheets.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop 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 seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads