Use this efficient n8n workflow to automatically download Gmail invoice PDFs, upload them to Google Drive, and log key transaction data to Google Sheets. This n8n workflow simplifies financial record-keeping.
Download this n8n workflow template and start using it instantly.
Manually handling incoming invoices is a tedious and error-prone process. This powerful n8n workflow eliminates that burden entirely. Designed as a set-it-and-forget-it automation, this n8n template monitors your Gmail inbox for new invoices, ensures they contain PDF attachments, automatically saves those files securely to Google Drive, and then logs all relevant metadata (filename, Drive link, date, sender) into a structured Google Sheet. By using a series of specific n8n node operations, it guarantees consistency and accuracy in your financial records, freeing up significant administrative time. This comprehensive n8n solution ensures no invoice is missed and every transaction is logged correctly.
The process begins with the Gmail Trigger n8n node, which acts as the starting point, polling your inbox every minute for unread emails tagged 'Personal'. This n8n trigger automatically downloads any attachments found. The next step is the 'Has PDF Attachments?' n8n node (Filter), which passes the data to the critical 'If' n8n node. This 'If' node checks for the presence of binary data (attachments) to prevent processing empty emails. If attachments are present, the workflow proceeds to the 'Upload to Google Drive' n8n node. This n8n node uploads the PDF, generating a unique filename or using the original one. Immediately following the upload, the 'Log to Google Sheets' n8n node takes the newly created file metadata (including the Drive link and file ID) and appends a new row to your designated spreadsheet. Finally, to ensure the email is not processed again on the next poll, the 'Mark Email as Read' n8n node uses the original message ID retrieved by the initial n8n trigger to update the email status in Gmail.
To deploy this useful n8n workflow, follow these setup steps:
={{ $('Gmail Trigger').item.json.id }} is correctly referencing the data output from the initial n8n trigger. Gmail Trigger n8n node:
Function: Starts the n8n workflow by detecting new emails.
Key Configuration: Polls every minute; checks for unread emails under the CATEGORYPERSONAL label; downloadAttachments is set to true to pull in the PDF.
If n8n node:
Function: Serves as the primary control flow, ensuring that the n8n workflow only proceeds if a binary attachment has been successfully downloaded.
Key Configuration: Condition checks if the $binary object has a length greater than zero: ={{ $binary && Object.keys($binary).length > 0 }}.
Upload to Google Drive n8n node:
Function: Handles the secure storage of the invoice PDF.
Key Configuration: File Name uses an expression to default to a timestamp if no original filename is provided; the input data field is dynamically set to the first attachment (=attachment0).
Log to Google Sheets n8n node:
Function: Records metadata about the uploaded file for centralized tracking.
Key Configuration: Operation is appendOrUpdate; data mapping is set to pull specific file properties (like name, webViewLink, and various IDs) generated by the previous Drive n8n node output.
Mark Email as Read (Gmail) n8n node:
Function: Marks the source email as processed, preventing re-triggering.
* Key Configuration: Uses the operation: markAsRead and references the unique Message ID from the originating Gmail n8n trigger.
Use this robust n8n workflow to schedule hourly backups from an FTP server directly to Google Drive. Perfect for data archival and reliable cloud storage synchronization.

Deploy this powerful n8n workflow template to instantly log expenses sent via Telegram into Google Sheets, using an n8n AI Agent for categorization and currency conversion.

Use this powerful n8n workflow template to automatically sync Eventbrite attendee check-in status to KlickTipp. Segment contacts immediately using the KlickTipp n8n node based on participation.

Use this powerful n8n workflow to automatically categorize and label incoming Gmail messages using OpenAI's GPT-4. Improve productivity with smart, AI-driven email sorting.









































