Extract spending history from gmail to google sheet
Ready for 3.0What 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).
- Extract invoice (Extract from File): extracts data from a file (pdf)
- Extract payment (Extract from File): extracts data from a file (pdf)
- Invoice data (Edit Fields (Set)): sets 6 fields: html, subject, date…
- Payment data (Edit Fields (Set)): sets 6 fields: html, subject, date…
- Switch: routes items into 3 branches
- HTML: parses or builds HTML
- Set data (Edit Fields (Set)): sets 4 fields: email_date, email_subject, email_content…
- Set data (Edit Fields (Set)): sets 4 fields: email_date, email_subject, email_content…
- Split Out: splits a list into separate items
- Merge: merges the data from its input branches
…plus 5 more steps. See the full node list below.
Services it uses
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)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Extract from File
n8n-nodes-base.extractFromFile - HTML
n8n-nodes-base.html - Split Out
n8n-nodes-base.splitOut - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Merge
n8n-nodes-base.merge
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…