Skip to main content

Extract invoices from Gmail with Laiye ADP and save them to Google Drive

Workflow preview

Workflow preview
100%
Extract invoices from Gmail with Laiye ADP and save them to Google Drive preview
Open on n8n.io

1. Workflow Overview

Workflow Introduction Core Competence Our invoice extraction workflow is completed end to end automatically: Gmail invoice email screening → extraction of key fields from multi format invoices → au...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.merge, n8n-nodes-base.googledrive, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.extractfromfile, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Laiye-ADP.

Original n8n.io source

1.1 Workflow description

Title
Extract invoices from Gmail with Laiye ADP and save them to Google Drive
Workflow name
Extract invoices from Gmail with Laiye ADP and save them to Google Drive

Workflow Introduction

Core Competence

Our invoice extraction workflow is completed end-to-end automatically: Gmail invoice email screening → extraction of key fields from multi-format invoices → automatic archiving of results to Google Drive, replacing the repetitive manual labor of finance staff in opening and entering invoices.

Differentiated Advantage

  1. High Accuracy: The extraction accuracy of core fields is 91%+, far exceeding that of similar products in the industry;
  2. Advantages of table extraction: For invoices containing tables, the line-extract technology has a significant extraction effect;
  3. Multi-format Compatibility: Natively supports invoice formats such as PDF, images, Word, Excel, etc., without the need for conversion;
  4. Lightweight Integration: Seamlessly integrates with Gmail and Google Drive, Out Of The Box.

Company Introduction

Laiye ADP (Agentic Document Processing), based on large language models and vision-language models, combined with agent technology, is a new generation platform that enables end-to-end automated document processing.

For more information, please visit the official website of Laiye Technology: ++https://laiye.com/++

Use Cases

  1. Multi-supplier integration: Efficiently process invoices from multiple suppliers, automatically extract key invoice information for archiving;
  2. Accounting firms batch process large amounts of invoice data: they can handle the increased invoice processing. requirements brought about by the growth in the number of clients without adding staff;
  3. Cross-border trade enterprises: For multi-language/complex layout overseas invoice scenarios, without the need for manual setup and human processing, achieve understanding of documents and then complete extraction of important data;
  4. Small and Medium-sized Technology Enterprises: Quickly identify important information such as invoice date, invoice amount, and invoice number from employee reimbursement invoices, and say goodbye to manual data entry.

How it works

Step 1: Complete Gmail authorization

You need to authorize your Google email. We will automatically obtain your email attachments from Google email. To accurately obtain and identify the invoice attachments, you can set up your email filter configuration by yourself, for example:

  • Emails with attachments and subjects containing keywords like "invoice";
  • Emails from supplier;
  • Emails under the designated label.

Step 2: Automate document filtering

We have configured the document automatic filterer for you, which will filter out the documents that meet the automated processing flow. There is no need for manual operation.

For those that do not meet the conditions, our workflow will store these documents in the designated folder for quick retrieval during manual processing. There is no need to sift through emails one by one.

The documents that we preset for automatic processing include the following conditions (union):

  • The attachment title contains text: invoice, receipt, expenses, fee (any one of them is sufficient. If you want to match other commonly used words in actual business, you can directly modify the {{ $json.attachment_extension }} field in the filter to assign the value.
  • File size: < 50MB
  • File format: .jpeg, .jpg, .png, .bmp, .tiff, .pdf, .doc, .docx, .xls, .xlsx.

Step 3: Complete ADP permission configuration

  • You need to go to adp.laiye.com to register for free, after which you can obtain 100 free calls per month

  • Select the Out Of The Box Agent Application-Invoice/Receipt Card, and click the more menu [...] on the card to directly obtain your exclusive API Key, App Secret, and Access Key
  • Simply fill the obtained Key into the configuration item of the 【Laiye ADP HTTP Request Node】
  • After ADP completes invoice extraction, it will return structured Json data, which includes more than 10 text fields, such as "Invoice Name", "Invoice Number", "Invoice Date", etc., as well as complete invoice table fields, such as "Item Name", "Description", "Quantity", "Unit Price", etc.

Step 4: Complete Google Drive authorization

  • Files processed by ADP will be automatically converted into binary data to ensure smooth import into Google Drive (Sheet)
  • Files that have not undergone ADP processing will be saved as the original files to the [Untreated Document] folder. If all files have been automatically processed, this folder will not be created
  • Extracted documents can be automatically saved to any folder you specify. By default, they are stored in MY Drive. If you wish to save them to a custom folder, simply modify the Parent Folder setting

Professional Community and Latest News

Follow us on LinkedIn for more updates! ++https://www.linkedin.com/company/laiye++

  • We will share the latest updates on Laiye ADP products;
  • You can share your successful invoice processing cases.

Problems & Support

If you encounter any issues during use, you can try contacting us for technical support ([email protected]++), and your message requesting technical support can include the following content:

  • Describe the problem you encountered in as much detail as possible
  • Your current invoice processing volume and type
  • The specific supplier format or invoice layout you handle
  • Target Accounting Software or System Integration
  • Any technical errors or issues with extraction accuracy
  • Current manual processing workflow and pain points Response time: within 24 hours on working days Professional Areas: Invoice Processing Automation, Order Processing Automation, Receipt Processing Automation

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 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 2 - Merge

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

Block 3 - Upload Unprocessed file

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

Block 4 - Extract attachment information

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Filter documents

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Base64 Encode Document

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

Block 7 - Laiye ADP HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 8 - Result Processor

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Upload the extracted result document

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

Block 10 - Create a pending folder

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

Block 11 - Sticky Note

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

Block 12 - Sticky Note1

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

Block 13 - Sticky Note2

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

Block 14 - Sticky Note5

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

Block 15 - Sticky Note3

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

3. Summary Table

Workflow Extract invoices from Gmail with Laiye ADP and save them to Google Drive
Complexity advanced
Nodes 15
Categories Invoice Processing, AI Summarization
Author Laiye-ADP
Published 03 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13174/13174.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 Extract invoices from Gmail with Laiye ADP and save them to Google Drive do?

Workflow Introduction Core Competence Our invoice extraction workflow is completed end to end automatically: Gmail invoice email screening → extraction of key fields from multi format invoices → au...

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.