← All N8N workflows
AI & researchChain LLMExtract From FileGmail TriggerGoogle SheetsHtml

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.

Workflow preview
TriggerGet invoiceGmail TriggerTriggerGet paymentGmail TriggerTransformExtract invoiceExtract From FileTransformExtract paymentExtract From FileTransformHTMLHtmlTransformSplit OutSplit OutTransformStructured OutputParser1Output Parser StructuredAI & modelsGoogle Gemini ChatModel1LM Chat Google GeminiData storeSendGoogle SheetsTransformSet data 0Edit FieldsTransformSet data 1Edit FieldsTransformSet data 2Edit FieldsTransformInvoice dataEdit FieldsTransformPayment dataEdit FieldsRoutingSwitchSwitchAI & modelsGroq Chat ModelLM Chat GroqTransformStructured OutputParserOutput Parser StructuredData storeSend1Google SheetsAI & modelsExtract details1Chain LLMTransformMergeMergeAI & modelsExtract detailsChain LLM

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Get invoiceTriggerGmail TriggerSee node parameters
Get paymentTriggerGmail TriggerSee node parameters
Extract invoiceTransformExtract From Filepdf
Extract paymentTransformExtract From Filepdf
HTMLTransformHtmlextractHtmlContent
Split OutTransformSplit OutSee node parameters
Structured Output Parser1TransformOutput Parser StructuredSee node parameters
Google Gemini Chat Model1AI & modelsLM Chat Google GeminiSee node parameters
SendData storeGoogle Sheetsappend
Set data 0TransformEdit FieldsSee node parameters
Set data 1TransformEdit FieldsSee node parameters
Set data 2TransformEdit FieldsSee node parameters
Invoice dataTransformEdit FieldsSee node parameters
Payment dataTransformEdit FieldsSee node parameters
SwitchRoutingSwitchSee node parameters
Groq Chat ModelAI & modelsLM Chat GroqSee node parameters
Structured Output ParserTransformOutput Parser StructuredSee node parameters
Send1Data storeGoogle Sheetsappend
Extract details1AI & modelsChain LLMSee node parameters
MergeTransformMergeSee node parameters
Extract detailsAI & modelsChain LLMSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

  • gmailOAuth2
  • googlePalmApi
  • googleSheetsOAuth2Api
  • groqApi

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

  1. 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
  2. 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
  3. 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.

More in AI & research