What This Workflow Does
This n8n workflow automates the process of extracting invoice attachments from your Gmail account and saving them directly to Google Drive. It eliminates the manual work of downloading and organizing invoices, ensuring all your financial documents are systematically stored in one secure location.
The workflow runs on a schedule (daily by default) to check your Gmail for new invoices, filters them based on your criteria, and uploads the attachments to a specified folder in Google Drive. This creates a reliable audit trail and makes it easy to retrieve invoices when needed for accounting, tax purposes, or vendor management.
How It Works
1. Checks Gmail for new messages
The workflow connects to your Gmail account and searches for emails matching your specified criteria (like sender, subject line, or labels). You can configure it to look for specific keywords like "invoice" or filter by sender domains.
2. Extracts invoice attachments
For each matching email, the workflow identifies and extracts PDF or other document attachments that contain invoice information. It can process multiple attachments per email and handle various file formats.
3. Uploads to Google Drive
The extracted files are automatically uploaded to your designated Google Drive folder. The workflow can create subfolders by date, vendor name, or other metadata to keep your invoices organized.
4. Logs processed emails
To prevent duplicate processing, the workflow marks processed emails or moves them to a designated folder in Gmail, creating a clean audit trail of completed actions.
Who This Is For
This automation is ideal for small business owners, freelancers, accounting teams, and finance professionals who receive invoices via email and need a systematic way to store them. It's particularly valuable for:
- Businesses processing 5+ invoices per week
- Teams needing centralized access to invoice records
- Companies preparing for tax season or audits
- Freelancers managing multiple client invoices
What You'll Need
- An n8n instance (cloud or self-hosted)
- Gmail account with invoices being received
- Google Drive account with storage space
- API access enabled for both services
Quick Setup Guide
- Download the JSON template file
- Import it into your n8n instance
- Connect your Gmail and Google Drive accounts
- Configure the search criteria for invoice emails
- Set your preferred destination folder in Google Drive
- Test with sample emails to verify functionality
- Activate the workflow and set your preferred schedule
Key Benefits
Saves 2-5 hours per week by eliminating manual invoice downloading and filing. What used to be a tedious daily chore now happens automatically.
Reduces human error by ensuring no invoices are missed or misfiled. The system processes every matching email consistently.
Creates searchable records in Google Drive where you can quickly find any invoice by vendor, date, or amount using Drive's powerful search.
Improves financial visibility by having all invoices in one organized location, making it easier to track expenses and manage cash flow.