Quick Overview
This workflow runs daily to search Gmail for receipt and invoice emails, uses Anthropic Claude to extract structured expense fields, and appends the confirmed expenses to a Google Sheets log.
How it works
- Runs every day on a schedule.
- Searches Gmail using the configured query to find recent receipt, invoice, or order confirmation emails.
- Flattens each matched email into a plain-text record (from, subject, date, and a truncated body) for reliable parsing.
- Sends all prepared email records to the Anthropic Messages API (Claude) to classify true receipts and extract vendor, amount, currency, date, category, and invoice/order number.
- Filters to confirmed receipts and formats them into rows, including the original email sender and subject for reference.
- Appends the expense rows to the target Google Sheets spreadsheet.
Setup
- Connect your Gmail account in the Gmail node and adjust the Gmail search query and look-back window in the configuration values.
- Provide an Anthropic API key (set the
ANTHROPIC_API_KEY environment variable) and ensure the model name matches one available to your account.
- Connect your Google Sheets account and select the target spreadsheet document, sheet tab, and matching columns for the appended expense fields.