ml-connector
TallyPrimeGoogle Sheets

TallyPrime and Google Sheets integration

TallyPrime handles accounting and inventory across your operations. Google Sheets holds your business data in the cloud where your team can access and analyze it. Connecting the two keeps a live record of every voucher, ledger entry, and stock movement from TallyPrime synced into a Sheets tab you control. No re-keying, no manual exports, no lag between the two.

How TallyPrime works

TallyPrime exposes ledgers, groups, vouchers (purchase, sales, payment, receipt, purchase orders), and stock items through HTTP POST requests to a local instance running on port 9000. It uses XML request envelopes to control operations (Import Data for writes, Export Data for reads) and returns results as XML. Port 9000 must be manually enabled in TallyPrime Settings. TallyPrime has no native webhooks, so integration requires polling. The application must be running and the target company must be loaded for API calls to succeed. All dates use YYYYMMDD format.

How Google Sheets works

Google Sheets exposes spreadsheets, tabs, and cell data through its REST API (v4) over HTTPS. Authentication uses OAuth 2.0 user-delegated or Service Account tokens. Sheets has no native ERP entities; you define your schema through tab names and column headers. The API operates on A1 notation ranges (e.g., Sheet1!A1:Z1000) or Named Ranges to read and write values. Drive watch channels for push notifications have short TTL (1 hour default, 24 hours max) and do not auto-renew, so polling is the reliable sync method.

What moves between them

The main flow runs from TallyPrime into Google Sheets. ml-connector polls TallyPrime's Day Book and voucher collections on a schedule you set (typically every 5-15 minutes), retrieves new or updated vouchers, maps each one to the columns you define in your sheet, and appends rows to the target tab. Ledger balances and stock quantities can also be polled and synced. The flow is read-only from TallyPrime into Sheets; Sheets is used for reporting and analysis, not for writing back to TallyPrime.

How ml-connector handles it

ml-connector accepts TallyPrime's local IP address, port 9000, company name (case-sensitive), and optional credentials. It polls the Export endpoint with date range filters (SVFROMDATE, SVTODATE in YYYYMMDD format) to fetch new vouchers since the last run, parses the XML response, and deduplicates against the last-seen voucher IDs to prevent duplicate rows. Each voucher is mapped to your sheet's column schema: date columns, amount columns, account/ledger name columns, and voucher type. ml-connector then appends rows to the sheet using the Sheets v4 API with your OAuth token or Service Account. Failed appends are retried. Because TallyPrime is single-user and desktop-only, ml-connector keeps requests sequential and allows time for the application to respond. The local TallyPrime instance must be running and the company must be open before the polling run starts.

A real-world example

A mid-sized import-export business in India runs TallyPrime for all accounting, purchase orders, and inventory. The finance team needs a live record of daily sales and purchase vouchers in a cloud spreadsheet so they can analyze cash flow, aging, and vendor performance without logging into the office server. Before the integration, the accountant exported a Day Book report daily and pasted it into a spreadsheet manually, losing hours each month to re-entry and reconciliation. With TallyPrime and Google Sheets connected, every voucher lands in the sheet automatically within minutes of posting, the analysis is live, and month-end close starts with clean data that is already in the cloud.

What you can do

  • Poll TallyPrime vouchers (purchase, sales, payment, receipt, purchase orders) and append new rows to your Google Sheet on a schedule you control.
  • Map TallyPrime ledgers, groups, and amounts to your custom sheet columns without coding or configuration files.
  • Authenticate to the local TallyPrime instance using host IP, company name, and optional credentials, and connect to Google Sheets via OAuth 2.0 or Service Account.
  • Deduplicate vouchers across polling runs so the same record never appears twice in your sheet.
  • Retry failed appends automatically and provide a full audit trail of every sync run.

Questions

Does ml-connector connect to TallyPrime in the cloud, or does it have to be on the local network?
TallyPrime's HTTP API only runs on the local machine or LAN on port 9000. ml-connector must run on the same network or connect through a local agent that bridges to port 9000. Cloud-to-cloud connection is not possible; the desktop application must be running and the company must be loaded.
Can ml-connector write vouchers back to TallyPrime from Google Sheets?
No. TallyPrime is the source of truth for accounting entries. ml-connector reads vouchers from TallyPrime and appends them to Sheets for reporting and analysis. To post new vouchers back to TallyPrime, you would use TallyPrime directly or a separate workflow.
What happens if TallyPrime is not running or the company is locked when ml-connector tries to poll?
ml-connector will not receive a response from port 9000 and the sync will fail. You must ensure TallyPrime is running and the target company is open and unloaded before the polling run. ml-connector tracks state so the next successful run will pick up any missed vouchers from the gap period.

Related integrations

Connect TallyPrime and Google Sheets

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started