Extract invoices from Gmail with Laiye ADP and save them to Google Drive
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 10 nodes and runs on Gmail events. Along the way it connects Gmail and Google Drive. It also calls adp.laiye.com over HTTP.
How it runs
Trigger: On Gmail events.
- Extract attachment information (Code): runs custom JavaScript code
- Filter documents (If): checks a condition and branches into true / false
- Base64 Encode Document (Extract from File): extracts data from a file (binary to propery)
- Create a pending folder (Google Drive): work with folder
- Merge: merges the data from its input branches
- Laiye ADP HTTP Request (HTTP Request): calls adp.laiye.com (POST)
- Upload Unprocessed file (Google Drive): uses Google Drive
- Result Processor (Code): runs custom JavaScript code
- Upload the extracted result document (Google Drive): uses Google Drive
Services it uses
HTTP calls to: adp.laiye.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
Nodes used (7)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Merge
n8n-nodes-base.merge - Google Drive
n8n-nodes-base.googleDrive - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - HTTP Request
n8n-nodes-base.httpRequest
From the author
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…