Templates / Extract spending history from gmail to google sheet

Extract spending history from gmail to google sheet

Ready for 3.0

by hana · 2,898 views · created 2024-09-15 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 21 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, Google Gemini Chat Model, Google Sheets and Groq Chat Model.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Extract invoice (Extract from File): extracts data from a file (pdf)
  2. Extract payment (Extract from File): extracts data from a file (pdf)
  3. Invoice data (Edit Fields (Set)): sets 6 fields: html, subject, date…
  4. Payment data (Edit Fields (Set)): sets 6 fields: html, subject, date…
  5. Switch: routes items into 3 branches
  6. HTML: parses or builds HTML
  7. Set data (Edit Fields (Set)): sets 4 fields: email_date, email_subject, email_content…
  8. Set data (Edit Fields (Set)): sets 4 fields: email_date, email_subject, email_content…
  9. Split Out: splits a list into separate items
  10. Merge: merges the data from its input branches

…plus 5 more steps. See the full node list below.

Services it uses

GmailGoogle Gemini Chat ModelGoogle SheetsGroq Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Get invoice, Get payment).

Nodes used (12)

From the author

How it works 1. Fetch transaction notification emails (including attachments) 2. Clean up data 3. Let AI (Basic LLM Chain node) generate bookkeeping item 4. Send to Google sheet Details 1. The example fetch email from Gmail lables, suggested using filters to…

Excerpt from hana's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.