Gmail PDF Invoice/Receipt Classifier and Google Drive Uploader (Based on n8n and OpenAI)
This workflow automates the processing of PDF invoices and receipts in Gmail, efficiently identifying and categorizing attachments in emails. Once triggered by a webhook, the system extracts PDF files within a specified date range, uses an AI model to determine their categories, and uploads the qualifying files to a dedicated folder in Google Drive. Additionally, users can choose to email the organized files to relevant personnel, significantly enhancing document management efficiency. It is suitable for businesses and individuals who need to archive and manage financial documents.
Tags
Workflow Name
Gmail PDF Invoice/Receipt Classifier and Google Drive Uploader (Based on n8n and OpenAI)
Key Features and Highlights
This workflow is triggered via a webhook to automatically scan Gmail inbox emails with attachments within a specified date range. It extracts PDF files and leverages OpenAI models to intelligently identify whether these PDFs belong to designated categories (such as invoices or receipts). Qualified PDFs are automatically uploaded to dedicated Google Drive folders named by date. The workflow supports customizable recognition keywords (e.g., “contract”) and optionally allows sending the filtered PDFs via email to specified recipients. With a high degree of automation, it significantly reduces manual effort in filtering and organizing documents.
Core Problems Addressed
- Automatically identify and classify large volumes of PDF invoices or receipts within Gmail emails, avoiding manual file content review
- Automatically organize and upload qualifying files to designated cloud folders for easy archiving and subsequent management
- Optionally batch-send organized files to accountants or relevant personnel, enhancing financial workflow efficiency
- Improve file filtering accuracy and reduce misclassification through OpenAI’s intelligent text understanding
Use Cases
- Software development companies or freelancers needing automated classification and archiving of business-related invoices and receipts
- Finance departments aiming to automatically organize and archive electronic invoices for easier auditing and reimbursement
- Regularly collecting specific types of PDF files and sending them to accounting staff or outsourced financial service providers
- Any users relying on Gmail for receiving electronic documents who wish to implement intelligent automated management
Main Workflow Steps
- Trigger the workflow via webhook with start/end date and email sending flag parameters
- Create a new Google Drive folder named by date (e.g., invoices_YYYY-MM-DD)
- Use the Gmail node to retrieve emails with attachments within the specified date range
- Filter and extract PDF attachments from each email
- Read PDF text content and verify that text length is within the OpenAI model’s token limit
- Call the OpenAI GPT-4.1-mini model to determine if the PDF matches preset keywords (default: “invoice or receipt”)
- If matched, upload the PDF file to the corresponding Google Drive folder
- If email sending is enabled, aggregate all matched PDFs and send them via the Gmail node to designated email addresses
Involved Systems and Services
- Gmail (email retrieval and sending)
- Google Drive (automatic folder creation and file upload)
- OpenAI GPT-4.1-mini model (intelligent PDF content classification)
- n8n automation platform (workflow orchestration and execution)
- Webhook (trigger entry point and parameter transmission)
Target Users and Value Proposition
- Software engineers, finance personnel, and freelancers, helping them efficiently manage and archive invoices and receipts
- Corporate finance departments, reducing manual handling of electronic vouchers and improving accuracy
- Accountants and outsourced financial service providers, facilitating centralized access to client documents
- Any users seeking to enhance document management workflows through intelligent automation technology
This workflow greatly improves the efficiency of processing electronic invoices and receipts. By leveraging AI-powered intelligent recognition, it reduces manual screening errors and serves as an ideal solution for modern office automation.
Automate Event Creation in Google Calendar from Google Sheets
This workflow implements automated synchronization between Google Sheets and Google Calendar, allowing for the automatic extraction of the latest event information and the generation of calendar events. Users simply need to add events in the spreadsheet, and the system will automatically format the dates and sync them to the calendar, supporting customizable options for titles, descriptions, locations, and more. This process significantly enhances the efficiency of event creation and reduces manual operation errors, making it suitable for businesses, educational institutions, and any users who need to convert spreadsheet data into calendar events.
Automated PDF to HTML Conversion
This workflow implements automatic monitoring and processing of newly uploaded PDF files in a specific folder on Google Drive. By calling a third-party API, it automatically converts the PDF files to HTML format and saves the generated HTML files back to Google Drive. This process requires no manual intervention, significantly improving the efficiency of file conversion and simplifying the operational steps. It is suitable for individuals and businesses that frequently handle PDF documents, helping to address the cumbersome issues of traditional conversion processes.
Create Nextcloud Deck Card from Email
This workflow automatically reads emails from a specified mailbox, cleans the HTML format, and extracts plain text information. It then converts this information into task cards in Nextcloud Deck. Through this process, users can quickly transform email content into trackable tasks, significantly improving the efficiency of information organization and task management, while reducing the tediousness of manual operations. It is suitable for both individuals and teams for task allocation and tracking in their daily work.
Intelligent Meeting Assistant and Automated Scheduling Workflow
This workflow aims to automate post-meeting management by integrating multiple services. It automatically retrieves Google Meet meeting recordings and transcribes them into text, utilizing AI smart agents for content summarization and key point extraction. The system can automatically identify follow-up tasks and create Google Calendar events, inviting relevant participants. This significantly enhances meeting efficiency, reduces manual operations and the risk of omissions, making it suitable for various scenarios such as remote work, project management, and internal corporate meetings.
Automatic Image File Download and Conversion to PDF for Local Storage
This workflow can automatically download specified image files and use an online service to convert them into PDF format, ultimately saving the converted files locally. With a one-click trigger, users do not need to intervene manually, significantly simplifying the process of converting images to PDF and improving work efficiency. It is suitable for scenarios that require batch processing and automated conversion, making it ideal for content management and digital office needs.
Readwise Reading Notes Automatic Sync and Push
This workflow is designed to automatically sync and push the latest reading notes from Readwise, specifically article-type notes without sub-nodes. It executes every 10 minutes, automatically retrieving the article title, author, summary, and link, and sends this information to a designated Telegram group to ensure real-time updates. By utilizing incremental syncing and local state file management, it avoids duplicate data retrieval, effectively enhancing the knowledge sharing efficiency and information dissemination for individuals or teams.
Automated Invoice Email Archiving to Nextcloud
This workflow automatically reads invoice emails from a specified mailbox, extracts and standardizes all attachment filenames, and then categorizes and stores them in Nextcloud based on the sending date and sender information. By automating the process, it reduces manual intervention, improves invoice management efficiency, and prevents omissions and confusion. It is suitable for corporate finance departments and accounting teams, facilitating the electronic and standardized storage of invoices and supporting digital transformation.
Google Calendar to Outlook
This workflow enables automatic synchronization between Google Calendar and Outlook Calendar, ensuring real-time updates for newly created and canceled events. Through an automated triggering mechanism, users can avoid time conflicts or omissions caused by inconsistent calendar information, thereby enhancing the efficiency of schedule management. It is suitable for both individuals and teams managing calendars in a cross-platform environment, especially for users who need to use both Google Workspace and Microsoft 365 simultaneously.