AI-Powered Document Classification and Google Drive Organization
detail.loadingPreview
Automate the intelligent classification of PDF documents received via email or webhook using advanced AI. This workflow intelligently categorizes attachments based on your custom criteria and organizes them into dynamically created Google Drive folders, streamlining your document management process.
About This Workflow
This powerful n8n workflow leverages the intelligence of OpenAI's GPT models to automatically classify PDF documents, such as receipts or invoices, received through a webhook or email trigger. Say goodbye to manual sorting and tedious data entry. Upon receiving documents, the workflow instantly creates a dedicated Google Drive folder (e.g., "invoices_YYYY-MM-DD"), analyzes each PDF's content against your defined criteria, and uploads only the relevant files to the correct location. It's fully customizable, allowing you to define precisely what constitutes a "match" for your business needs, significantly enhancing efficiency and reducing operational overhead while providing instant feedback on folder creation.
Key Features
- Intelligent AI Classification: Utilizes OpenAI's GPT to accurately classify PDF content based on highly customizable criteria.
- Automated Google Drive Organization: Automatically creates and uploads classified PDFs to dynamically generated Google Drive folders, responding with the new folder's URL.
- Customizable Matching Logic: Easily define what type of document you want to match (e.g., "software engineering business cost invoices").
- Scalable Attachment Processing: Efficiently iterates and processes multiple PDF attachments from a single input.
- Token Limit Management: Smartly checks PDF text content against LLM token limits to prevent errors and optimize API usage.
How To Use
- Configure Credentials: Set up your OpenAI API key and connect your Google Drive account in n8n credentials. Also, configure the Header Auth for the Webhook for secure access.
- Define Matching Criteria: In the "Configure" node, update the
"Match on"string to precisely describe the type of document you want to classify (e.g.,"client contracts","marketing expense receipts"). This is the core instruction for the AI. - Set up Webhook/Email Trigger: The workflow starts with a Webhook. You'll need to set up an upstream system (e.g., an email parsing service, or another n8n email node) to send email attachment data to this webhook, ensuring it provides relevant email item information for attachment iteration.
- Adjust Token Limits (Optional): In the "Configure" node, you can adjust
maxTokenSizeandreplyTokenSizeto fine-tune the AI processing limits based on your typical document lengths and OpenAI model capabilities. - Enable Email Notifications (Optional): If you wish to send an email summary or notification, ensure the incoming webhook body includes
"sendEmail": "true"and potentially configure thesendInvoicesTofield in the "Configure" node (this part requires additional email sending nodes not fully shown in the snippet).
Apps Used
Workflow JSON
{
"id": "11ba145a-d398-4aab-99e1-faebc396769f",
"name": "AI-Powered Document Classification and Google Drive Organization",
"nodes": 28,
"category": "Operations",
"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: 11ba145a-d398...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.