Extract invoice data into Google Sheets with LDX hub AnalyzeDoc Gemini
Go to WorkflowDescription
Quick overview
This workflow collects an invoice PDF or image through an n8n form, uses LDX hub AnalyzeDoc (Gemini) to extract key invoice fields as JSON, and appends the results as a new row in Google Sheets.
How it works
Receives an invoice file upload (PDF/JPG/PNG) through an n8n form submission.
Sends the uploaded document to LDX hub AnalyzeDoc (google/gemini-3.5-flash) with a prompt that extracts invoice metadata, parties, dates, and amounts into a JSON schema.
Parses the extracted JSON into structured fields for downstream use.
Appends the extracted invoice fields as a new row in the selected Google Sheets spreadsheet and worksheet.
Setup
Install the community node package n8n-nodes-ldxhub and create an LDXhub API credential (API key) for the AnalyzeDoc node.
Add a Google Sheets OAuth2 credential and select the target spreadsheet and sheet in the Google Sheets append step.
Create a header row in your Google Sheet that matches the extracted fields (invoice_number, issue_date, due_date, vendor_name, vendor_address, vendor_tax_id, bill_to, subtotal, tax, total, currency, payment_terms) so auto-mapping writes to the correct columns.