ReadPDF Automate

ReadPDF Automate efficiently extracts text from PDF attachments in Gmail, filters them based on customizable search terms using OpenAI, and uploads relevant files to a designated Google Drive folder. This streamlined process saves time and ensures important documents, like invoices or contracts, are organized for easy access and future processing.

7/8/2025
18 nodes
Complex
manualcomplexreadpdfsticky notenoopopenaigoogle drivegmailtriggeradvancedlogicconditional
Categories:
Communication & MessagingComplex WorkflowManual Triggered
Integrations:
ReadPDFSticky NoteNoOpOpenAiGoogle DriveGmailTrigger

Target Audience

This workflow is ideal for:
- Small Business Owners: Those who frequently receive invoices or contracts via email and want to automate the organization of these documents in Google Drive.
- Freelancers: Individuals who handle multiple clients and need a streamlined way to manage and store received PDF documents.
- Accountants and Financial Professionals: Professionals who regularly deal with financial documents and need to categorize and archive them efficiently.
- Tech-Savvy Users: Users comfortable with automation tools like n8n and looking to enhance their workflow efficiency.

Problem Solved

This workflow addresses the challenge of manually sorting and saving PDF attachments from emails. It automates the process of:
- Identifying relevant PDF attachments (e.g., invoices, receipts) based on user-defined criteria.
- Sending the identified PDFs to a specified Google Drive folder, reducing the risk of losing important documents and saving time spent on manual organization.

Workflow Steps

  • Trigger: The workflow starts when an email is received, specifically looking for attachments.
    2. Check for Attachments: It verifies if the email contains any attachments.
    3. Iterate Attachments: For each attachment, the workflow checks if it is a PDF file.
    4. Read PDF Content: If it is a PDF, the content is extracted for analysis.
    5. Token Limit Check: The workflow ensures that the text length of the PDF does not exceed the token limits set for processing.
    6. OpenAI Analysis: The content is sent to OpenAI to determine if it matches the predefined search term (e.g., 'payslip').
    7. Conditional Actions: Based on OpenAI's response, the workflow decides whether to upload the PDF to Google Drive or ignore it.
    8. Upload to Google Drive: If the PDF matches the criteria, it is uploaded to a specified Google Drive folder for easy access and storage.
  • Customization Guide

    Users can customize this workflow by:
    - Modifying Search Terms: Change the 'Match on' value in the Configure node to filter for different types of documents (e.g., 'invoice', 'receipt').
    - Adjusting Token Sizes: Update 'maxTokenSize' and 'replyTokenSize' in the Configure node to optimize the workflow based on the specific OpenAI model being used.
    - Changing Google Drive Folder: Update the 'Google Drive folder to upload matched PDFs' value to point to a different folder where the PDFs should be stored.
    - Adding Additional Conditions: Users can introduce more conditions in the workflow to refine the filtering process further or add more actions based on the results from OpenAI.