Skip to main content

Analyze invoices from Google Drive with AI and store data in Google Sheets

Workflow preview

Workflow preview
100%
Analyze invoices from Google Drive with AI and store data in Google Sheets preview
Open on n8n.io

1. Workflow Overview

Who this template is for This workflow is designed for teams and businesses that receive invoices in Google Drive and want to automatically extract structured financial data without manual processi...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.switch, n8n-nodes-base.set, n8n-nodes-base.wait, n8n-nodes-base.stickynote, n8n-nodes-base.googledrive

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Stefan Joulien.

Original n8n.io source

1.1 Workflow description

Title
Analyze invoices from Google Drive with AI and store data in Google Sheets
Workflow name
Analyze invoices from Google Drive with AI and store data in Google Sheets

Who this template is for

This workflow is designed for teams and businesses that receive invoices in Google Drive and want to automatically extract structured financial data without manual processing. It is ideal for finance teams, operators, and founders who want a simple way to turn invoices into usable data.

No accounting software is required, and the workflow works with common invoice formats such as PDFs and images.

What this workflow does

This workflow monitors a Google Drive folder for newly uploaded invoices. When a file is detected, it uses AI to extract key invoice information such as issuer, date, total amount, taxes, currency, and description.

The extracted data is automatically cleaned, structured, and stored in Google Sheets, creating a centralized and searchable invoice database.

How it works

  1. The workflow starts when a new file is added to a Google Drive folder
  2. Each file is processed individually and classified based on its type (PDF or image)
  3. The file is then downloaded and analyzed using an AI model optimized for document or image understanding
  4. Key invoice fields such as issuer, date, total amount, taxes, currency, and description are extracted and normalized into structured fields
  5. The AI output is appended to a Google Sheets table — a short wait step ensures reliable sequential writes when multiple invoices are processed at the same time

How to set up

  1. Select the Google Drive folder where invoices will be uploaded
  2. Connect your OpenAI credentials for document and image analysis
  3. Choose the Google Sheets file that will store the extracted invoice data
  4. Activate the workflow and upload an invoice to test it

Requirements

  • Google Drive account
  • Google Sheets account
  • OpenAI API credentials
  • n8n instance (cloud or self-hosted)

How to customize the workflow

You can adjust the fields extracted from invoices, add validation rules, connect the data to accounting tools, or extend the workflow with reporting and notification steps.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Google Drive Trigger

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 3 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 4 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 5 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 7 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Edit Fields2

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Mapeo

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - download image

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 15 - Download PDF

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 16 - Download image

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 17 - analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 18 - analyze image1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 19 - analyze document

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

Block 20 - Put data in table

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 21 - Put data in table1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 22 - Put data in table2

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 23 - Save_drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

3. Summary Table

Workflow Analyze invoices from Google Drive with AI and store data in Google Sheets
Complexity advanced
Nodes 23
Categories Invoice Processing, AI Summarization
Author Stefan Joulien
Published 27 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13750/13750.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze invoices from Google Drive with AI and store data in Google Sheets do?

Who this template is for This workflow is designed for teams and businesses that receive invoices in Google Drive and want to automatically extract structured financial data without manual processi...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.