Automate Gmail PDF Attachments to Google Drive with OpenAI
detail.loadingPreview
Automatically send specific PDF attachments from Gmail to Google Drive, leveraging OpenAI for content filtering. This workflow uses the 'On email received' node to trigger, 'OpenAI' to analyze PDF content, and 'Google Drive' to store matched files.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow automates the process of sorting and storing PDF attachments received via Gmail. It intelligently reads the content of PDF attachments using OpenAI, filters them based on a configurable keyword (e.g., 'invoice', 'payslip'), and uploads the relevant PDFs to a designated Google Drive folder. This solves the problem of manually sifting through emails and organizing important PDF documents, saving time and improving efficiency for tasks like invoice processing, contract management, or receipt archiving.
Key Features
- Gmail Integration: Triggers workflows automatically upon receiving new emails.
- Attachment Handling: Iterates through all attachments in an email.
- PDF Content Analysis: Uses OpenAI to read and understand the textual content of PDF files.
- Keyword-Based Filtering: Configurable keyword to identify specific types of PDFs (e.g., invoices, receipts).
- Google Drive Integration: Uploads identified PDF attachments to a specified Google Drive folder.
- Token Size Management: Allows configuration of OpenAI token limits for efficient processing.
How To Use
- Configure Gmail Trigger: Set up the
On email receivednode with your Gmail credentials and desired polling interval. Ensure attachments are set to be downloaded. - Define Keywords and Folder: In the
Configurenode, specify the keyword toMatch on(e.g., 'invoice') and paste the URL of your target Google Drive folder. - Set Token Limits: Adjust
maxTokenSizeandreplyTokenSizein theConfigurenode based on your OpenAI plan and needs. - Iterate Attachments: The
Iterate over email attachmentsnode will process each attachment. - Check PDF Type: The
Is PDFnode filters for PDF files. - Analyze Content with OpenAI: For PDFs, the
OpenAI matches PDF textual contentnode reads the text and checks if it matches your specified keyword. - Upload to Google Drive: If OpenAI confirms a match, the
Upload file to foldernode sends the PDF to your configured Google Drive folder. - Replace Credentials: Update the placeholder credentials for OpenAI and Google Drive with your actual API keys/OAuth information.
Apps Used
Workflow JSON
{
"id": "46add7c7-8859-4d61-8815-74e349f26ff7",
"name": "Automate Gmail PDF Attachments to Google Drive with OpenAI",
"nodes": 0,
"category": "Email Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 46add7c7-8859...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automated Email Phishing Detection and Jira Ticketing
Detect potential phishing emails using Gmail or Outlook triggers and OpenAI analysis, then automatically create Jira tickets with detailed findings. This workflow enhances security by streamlining the reporting and investigation of suspicious emails.
Microsoft Outlook AI Email Assistant for Automated Categorization
Automate the categorization of your Outlook emails using AI. This workflow fetches unread, uncategorized emails, uses OpenAI to analyze and assign categories, and updates the email, streamlining inbox management.
Automated Phishing Email Detection and Jira Ticket Creation
This workflow automatically detects phishing emails via Gmail, analyzes them with ChatGPT, and creates detailed Jira tickets with screenshots for investigation.