Process AP invoices from Gmail and Drive with Gemini, Sheets and QuickBooks
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs on Google Drive events (file created) (plus 1 other trigger). Along the way it connects Gmail, Google Drive, Google Gemini and Google Sheets and 1 more. It also calls sandbox-quickbooks.api.intuit.com over HTTP.
How it runs
Trigger: On Google Drive events (file created) (plus 1 other trigger).
- Extract Drive File Metadata (Code): runs custom JavaScript code
- Parse Gmail Attachment (Code): runs custom JavaScript code
- Download Invoice from Drive (Google Drive): download
- Route by File Format (Switch): routes items into 2 branches
- Verify PDF Text Presence (Extract from File): extracts data from a file (pdf)
- Parse Invoice Image Fields (Google Gemini): analyze (image)
- Check PDF Text (If): checks a condition and branches into true / false
- Refine Image Fields Data (Code): runs custom JavaScript code
- Analyze PDF Text and Regex (Code): runs custom JavaScript code
- Check AI Confidence Level (If): checks a condition and branches into true / false
…plus 7 more steps. See the full node list below.
Services it uses
HTTP calls to: sandbox-quickbooks.api.intuit.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Code
n8n-nodes-base.code - Google Drive
n8n-nodes-base.googleDrive - Switch
n8n-nodes-base.switch - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Google Sheets
n8n-nodes-base.googleSheets - Slack
n8n-nodes-base.slack - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow monitors Gmail and a Google Drive folder for new invoice attachments, extracts invoice data using Google Gemini (text or vision), validates confidence scores, logs results to Google Sheets, creates vendor bills in QuickBooks…