Automatic Gmail Invoice PDF Upload to Google Drive with Spreadsheet Logging
Sort invoice PDFs from Gmail to Google Drive and Google Sheets
Who’s it for
Freelancers, finance teams, and small businesses that receive invoice PDFs by email and want them automatically saved to Google Drive and logged in Google Sheets—without manual downloading or copy-pasting.
How it works / What it does
This workflow watches your Gmail inbox for unread messages that match an invoice pattern (e.g., subject:invoice filename:pdf). For each email, it checks for attachments, uploads each PDF to a chosen Google Drive folder, and appends a new row to a Google Sheet with useful metadata: received time, sender, subject, filename, Drive link, and IDs. Finally, it marks the original email as read to avoid duplicates.
How to set up
Open the Config (Set) node and fill in:
drive_folder_id (or leave blank for root) spreadsheet_id (from the Sheet URL) sheet_name (e.g., Invoices) Connect credentials for Gmail, Google Drive, and Google Sheets in each node. Adjust the Gmail search query if needed (language/vendor terms). Run once manually to verify data mapping, then activate.
Requirements
n8n with valid credentials for Gmail, Google Drive, and Google Sheets. A Google Sheet with appropriate headers (or let the workflow write new columns).
How to customize the workflow
Replace Gmail with IMAP or Microsoft Outlook if you don’t use Gmail; remove the “mark as read” step accordingly. Add parsing (e.g., extract invoice totals or vendor names via PDF/AI nodes) before the Sheets step. Route based on vendor: create subfolders dynamically in Drive and write to different tabs. Notify your team by adding Slack/Email nodes after logging to Sheets.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments