Automate Gmail: Label & Extract Invoices with OCR
Automate Gmail: Label & Extract Invoices with OCR
Couldn't load pickup availability
Automate Gmail: Label & Extract Invoices with OCR
Transform your Gmail inbox into an intelligent document processing powerhouse that automatically labels emails and extracts critical invoice data using advanced OCR technology. This n8n workflow eliminates manual email sorting and data entry by leveraging Mistral AI and Google Gemini to classify messages and extract financial information from PDF attachments.
What this workflow does
This automated Gmail processing system polls your inbox every minute for new messages, then intelligently categorizes and processes them. The workflow downloads email attachments, cleans and normalizes content, and uses AI-powered email analysis to suggest appropriate Gmail labels. When labels don't exist, they're automatically created and applied to messages.
For PDF attachments, the workflow uploads documents to Mistral OCR for content extraction as markdown. The Mistral Analyzer then classifies documents as Invoice, Quote, Reminder, or Other, while extracting key financial fields including amounts, net amounts, tax, IBAN, due dates, document numbers, and sender information. Documents are automatically sorted into category-specific Google Drive folders, with invoices logged to a comprehensive Google Sheets register.
Use cases
- Freelancers managing client invoices and payment tracking across multiple projects
- Small businesses automating accounts payable processing and vendor document organization
- Finance teams streamlining invoice data entry and compliance record-keeping
- German market businesses requiring §14 UStG compliant accounting field extraction
- Any organization receiving high volumes of financial documents via Gmail
Technical details
Built using essential n8n nodes including Gmail triggers, conditional logic (if, switch), code transformations, merge operations, and Gmail tool integrations. The workflow integrates Gmail OAuth2, Mistral AI OCR, Google Gemini as AI fallback, Google Drive for document storage, and Google Sheets for invoice logging. Optimized for German accounting requirements but supports multi-language document processing.
Perfect for n8n users, automation engineers, and SaaS operators seeking robust email automation with intelligent document processing capabilities.
