Extract spend details (template)
Configured with Chain LLM, Extract From File, Gmail Trigger, Google Sheets, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Transform
- AI & models
- Data store
- Routing
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Get invoice | Trigger | Gmail Trigger | See node parameters |
| Get payment | Trigger | Gmail Trigger | See node parameters |
| Extract invoice | Transform | Extract From File | |
| Extract payment | Transform | Extract From File | |
| HTML | Transform | Html | extractHtmlContent |
| Split Out | Transform | Split Out | See node parameters |
| Structured Output Parser1 | Transform | Output Parser Structured | See node parameters |
| Google Gemini Chat Model1 | AI & models | LM Chat Google Gemini | See node parameters |
| Send | Data store | Google Sheets | append |
| Set data 0 | Transform | Edit Fields | See node parameters |
| Set data 1 | Transform | Edit Fields | See node parameters |
| Set data 2 | Transform | Edit Fields | See node parameters |
| Invoice data | Transform | Edit Fields | See node parameters |
| Payment data | Transform | Edit Fields | See node parameters |
| Switch | Routing | Switch | See node parameters |
| Groq Chat Model | AI & models | LM Chat Groq | See node parameters |
| Structured Output Parser | Transform | Output Parser Structured | See node parameters |
| Send1 | Data store | Google Sheets | append |
| Extract details1 | AI & models | Chain LLM | See node parameters |
| Merge | Transform | Merge | See node parameters |
| Extract details | AI & models | Chain LLM | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
gmailOAuth2googlePalmApigoogleSheetsOAuth2ApigroqApi
Workflow notes
Extract invoice
No attachements
HTML
".spend-table" here is an example when the email use "spend" html tags to display each spends. e.g.
A. Get data
A. Get data
- Set up labels in Gmail
- Suggested using Gmail filters to move emails to labels automatically
B. Deal with the data
B. Deal with the data
- Multiple payment info in one mail: input the "sender" of the emails that contain more than one payment info. e.g. credit card daily spend notification
- One payment info in one mail: input the "sender" of the emails that contain only one payment info. e.g. instant credit card spend notification
- Invoices: input the mails that contain one invoice in one mail
C. Get spend details and send to google sheet
C. Get spend details and send to google sheet
- Edit the output schema to fit your google sheet format
- Edit the prompt to fit your needs
Extract spend details (template)
Extract spend details (template)
Purpose and structure
This folder contains the Extract spend details (template) workflow. Its executable nodes use chainLlm, extractFromFile, gmailTrigger, googleSheets, html, lmChatGoogleGemini, lmChatGroq, merge, outputParserStructured, set, splitOut, switch. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Get invoice, Get payment
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/1935_Splitout_Extractfromfile_Automation_Triggered.json MIT; preserve source notices.