Extract invoice data from scanned PDFs to Google Sheets with Sarvam and Gemini

Go to Workflow
146 views
Built by Divyanshu Gupta Divyanshu Gupta
Created on June 05, 2026

Description

This template is designed for operations, finance, and accounting teams that need to automatically process scanned invoices and extract structured data without manual entry.

It is ideal for businesses handling vendor invoices, reimbursement forms, or bulk document intake.

What this workflow does
This workflow uses Sarvam AI Vision model to perform OCR on scanned invoices and extract raw text. The extracted content is then processed using an LLM to identify key invoice fields such as:

Vendor name
Invoice number
Invoice date
Total amount
GST / Tax amount

The structured data is automatically appended to Google Sheets for tracking, reconciliation, or downstream accounting automation.

Requirements
Sarvam Vision API key (configured using HTTP Header credentials)-(https://dashboard.sarvam.ai/key-management)
Google Gemini API key (configured via Google Gemini credentials in n8n)
Google Sheets OAuth credentials

How to set up
1.) Add your Sarvam API key in Credentials.
2.) Connect your Google Sheets account.
3.) Update the target Sheet ID.
4.)Test with a sample invoice PDF.

Need Help?
ask in the Forum!

Happy Hacking!

Nodes Used (6)

Code
n8n-nodes-base.code
Compression
n8n-nodes-base.compression
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor