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
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
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...
Compare Lists and Identify Common Items & Differences Using Custom Keys
This workflow compares two lists of objects (List A and List B) using a user-specified key (e.g. email, id, domain) and ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments