Parse invoices & documents with Gemini AI, OCR, and Google Sheets integration
Smart Document Parser for Invoices, Logs or Sensor Reports (PDF/Image to Google Sheets) This n8n workflow automatically parses documents such as invoices, sensor logs or structured PDFs/images (including scanned docs ...
Template notes
Smart Document Parser for Invoices, Logs or Sensor Reports (PDF/Image to Google Sheets)
This n8n workflow automatically parses documents such as invoices, sensor logs or structured PDFs/images (including scanned docs or CSVs), extracts key fields like totals, dates and customer/vendor info using OCR and AI, and writes the structured output into Google Sheets.
Who’s it for
Finance or Ops teams automating invoice processing. SaaS platforms parsing uploaded reports or documents. Anyone needing a no-code backend for PDF/image/CSV document parsing. AI-powered data capture pipelines.
How it works 1. Webhook Trigger receives file uploads (/uploadDoc) 2. Switch Node checks the file type: If image → Use Tesseract OCR If PDF → Use PDF parser If CSV → Extract as-is 3. Extracted text is passed to: Google Gemini or Gemini Flash AI model Prompt extracts fields like invoiceid, total, customername, etc. 4. JSON string is parsed and cleaned 5. Data is appended to Google Sheets using appendOrUpdate
How to set up 1. Create a Google Sheet with columns like:
invoiceid, invoicedate, duedate, customername, vendorname, subtotal, taxtotal, total, currency
2. Connect: Google Sheets OAuth Google Gemini (PaLM API key) for LLM parsing 3. Deploy the webhook endpoint: /uploadDoc 4. Upload sample files (PDFs, images, CSVs) to test 5. Review and map sheet columns in the Invoice Data node