Extract spend details (template)

A. Get data - Set up labels in Gmail - Suggested using Gmail filters to move emails to labels automatically

Workflow Structure (21 nodes)
100%
Gmail Trigger
Get invoice
Extract From File
Extract invoice
Set
Invoice data
Switch
Switch
Html
HTML
Split Out
Split Out
Set
Set data 1
Set
Set data 0
Merge
Merge
Langchain.chain Llm
Extract details
Google Sheets
Send
Gmail Trigger
Get payment
Extract From File
Extract payment
Set
Payment data
Set
Set data 2
Langchain.lm Chat Google Gemini
Google Gemini Chat Model1
Langchain.lm Chat Groq
Groq Chat Model
Langchain.chain Llm
Extract details1
Langchain.output Parser Structured
Structured Output Parser1
Langchain.output Parser Structured
Structured Output Parser
Google Sheets
Send1
Node Types:
trigger
default
logic
action
transform
Requires credentials

Prerequisites

Required Credentials (4)

Gmail

Used by: Get invoice, Get payment

Docs

Google Palm

Used by: Google Gemini Chat Model1

Docs

Google Sheets

Used by: Send, Send1

Docs

Groq

Used by: Groq Chat Model

Docs

Multiple services required

This workflow needs 4 different credentials. Make sure you have accounts for all services before importing.

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~55 min
Score: 68/100
Conditional Logic
4 Integrations

When to Use This Workflow

Streamline Team Communication

Automatically route notifications and updates to the right channels and people.

Reduce information overload while keeping everyone informed.

Automated Reporting

Automatically collect and organize data into spreadsheets for analysis.

Spend less time on data entry and more time on insights.

Email Automation

Automate email responses, forwarding, or organization based on rules.

Handle routine email tasks automatically and focus on what matters.

workflow.json
{
  "id": "nkMjcOC4hpte1a0t",
  "meta": {
    "instanceId": "3986dc65ca3ddc4ee46e71fc194b0a9d4ef46d960a5e71624f9f7eaa198213cb",
    "templateCredsSetupCompleted": true
  },
  "name": "Extract spend details (template)",
  "tags": [
    {
      "id": "9mCuuNEpnYNvVzb8",
      "name": "Finance",
      "createdAt": "2024-09-15T07:22:30.749Z",
      "updatedAt": "2024-09-15T07:22:30.749Z"
    }
  ],
  "nodes": [
    {
      "id": "8e1e0861-9f06-4fe2-a9c1-423bab246959",
      "name": "Get invoice",
      "type": "n8n-nodes-base.gmailTrigger",
...

Workflow Details

Nodes
24
Trigger
Event
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Auto-label incoming Gmail messages with AI nodes

Add AI labels to Gmail messages With this workflow you can automatically set labels for your Gmail message according to...

Gmail
Chainllm
Outputparserstructured
Lmchatopenai
19 nodesEvent
Curated

Gmail AI auto-responder: create draft replies to incoming emails

When I receive an Email

Gmail
Outputparserstructured
Lmchatopenai
Chainllm
12 nodesEvent
Curated

Social Media Analysis and Automated Email Generation

Personalize here Set: - your name - your company name - your company activity, used to find a match with your leads - y...

Http-request
Lmchatopenai
Outputparserstructured
Chainllm
19 nodesEvent
Curated

Invoice data extraction with LlamaParse and OpenAI

2. Advanced PDF Processing with LlamaParse [Read more about using HTTP Requests](https://docs.n8n.io/integrations/builti...

Lmopenai
Outputparserstructured
Http-request
Gmail
26 nodesEvent
Curated

Visual Regression Testing with Apify and AI Vision Model

Part A. Generate Base Images Before we can run our visual regression tests, we must generate a series of base screenshot...

Google-drive
Lmchatgooglegemini
Outputparserstructured
Http-request
34 nodesScheduled
Curated

Classify lemlist replies using OpenAI and automate reply handling

Get your lemlist API key 1. Go to your lemlist account or create one [HERE](https://app.lemlist.com/create-account) 2. G...

Lemlist
Lmchatopenai
Outputparserstructured
Slack
18 nodesEvent
Curated