How to automate email into TallyPrime
Short answer
Read a shared mailbox over IMAP or Microsoft Graph, classify and extract each message, build voucher XML, and import it into Tally only after review. Outbound, schedule statements and invoices from Tally exports. Tally is not a mail client, so the bridge does the work.
For many Tally shops the real data entry load is email. Suppliers send purchase invoices as PDFs, customers send purchase orders, and the bank sends statements. A clerk opens each, types the details into a purchase or receipt voucher and replies to say it was done.
Tally can print or email some documents, but it cannot read an inbox. The useful automation therefore lives outside: a service that watches the mailbox, extracts structured data, checks it against Tally masters, and prepares vouchers for a person to confirm before they reach the books.
What teams use it for
Supplier invoice to purchase voucher
Extract party, invoice number, date, items and GST breakup from an attached PDF and prepare a purchase voucher draft.
Customer PO capture
Parse purchase orders into a sales order or a worklist, matching item codes to Tally stock items.
Bank statement import
Convert statement attachments into receipt and payment drafts mapped to bank ledgers for reconciliation.
Scheduled statements and reminders
Export ledger statements from Tally to PDF and email them to customers on a monthly schedule.
Remittance advice matching
Read a customer's payment advice and propose which open bills it settles.
Duplicate invoice screening
Check supplier invoice number and amount against existing vouchers before drafting a new entry.
TallyPrime integration surface
- Import Data over the XML/HTTP port: vouchers are created from a TALLYMESSAGE containing VOUCHER, LEDGERENTRIES and inventory entries, with exact ledger and stock item names.
- Export Data for master lists: ledgers, stock items, units and GST details used to validate extracted values.
- Voucher import from XML or JSON files through the application, used when the port is disabled and a person loads files.
- GST fields on vouchers: party GSTIN, place of supply and tax ledgers, which extraction must fill correctly.
- Tally's own email-sending options for reports and invoices, which depend on the release and a configured mail account.
How it works
- 1
Set up the mailbox access
Use a dedicated shared mailbox with IMAP, or Microsoft Graph for Microsoft 365, with read and move permissions only.
- 2
Classify each message
Sort into invoice, PO, statement, remittance and other, using sender rules first and a model for the rest.
- 3
Extract fields
Pull structured data from the body or attachments. Scanned PDFs need OCR; text PDFs and Excel can be parsed directly.
- 4
Validate against Tally
Match supplier names to ledgers, check GSTIN format, verify tax maths and look for duplicates by number and amount.
- 5
Queue for review
Show the extracted values beside the source, with unmatched items highlighted, in a simple review screen.
- 6
Import and reply
On approval, send the voucher XML to Tally, store the result, move the email to a processed folder and optionally send an acknowledgement.
Example flows
Supplier invoice arrives at accounts@
Trigger: New email with a PDF attachment
- Classifier tags it as a purchase invoice from a known supplier.
- Extraction reads number, date, lines and tax.
- Validation maps the supplier to its Tally ledger and flags a rate difference.
- Reviewer fixes one line and approves; the voucher is imported.
Result: Entry time drops to a quick check, and the email is filed with the voucher reference.
Monthly statement mailing
Trigger: Third working day of the month
- Bridge lists customers with outstanding balances.
- A PDF statement is exported for each ledger.
- Emails go out with the statement and a payment contact.
Result: Customers receive statements consistently, and bounces are logged for follow-up.
Keeping data on-prem
A purely local setup is practical: run the mailbox reader, extraction and review screen on a server in your office, and let it reach Tally across the LAN. For classification and field extraction use an open-weight model hosted on your own machine, so supplier invoices and bank statements are never sent to a public AI service. If the mailbox is hosted at Microsoft or Google, only the mail fetch crosses the boundary. Keep original attachments in a local archive and link them to the voucher by reference.
Security checklist
- Scope mailbox access to one shared inbox, not individual mailboxes.
- Treat attachments as untrusted: scan for malware and never execute embedded content.
- Verify changed bank details in a supplier email by a call-back before any payment, since this is a common fraud pattern.
- Require reviewer approval before posting, and log reviewer and timestamp.
- Keep credentials for mail and the Tally host in a secrets store.
Ways to get it done
Off-the-shelf invoice capture tool
Effort: Days to weeks; check the quality of its Tally voucher mapping and GST handling.
Firms with standard invoices wanting a ready product with a Tally export.
In-house script plus Tally XML
Effort: Three to six weeks to cover edge cases and review.
A single mailbox and a handful of regular suppliers.
Partner build with Netray
Effort: Scoped per project; commonly several weeks including tuning.
High volume, many layouts, or a requirement to keep documents on private infrastructure.
Pitfalls
- !A supplier ledger name that differs by one character causes the import to create or reject the wrong ledger.
- !GST place of supply and tax ledger selection are the most common errors in generated purchase vouchers.
- !Forwarded emails and inline images hide the real attachment; handle them explicitly.
- !Auto-posting without review multiplies a single misread amount across the books.
Frequently asked questions
Can TallyPrime read emails to create entries?
No. Tally can send some reports and documents by email but does not read an inbox. A separate service reads the mailbox, extracts data and imports vouchers through Tally's XML interface or by file import.
How accurate is extraction from supplier invoices?
It depends on layout quality and consistency. Clean text PDFs from regular suppliers extract well, while scans and unusual layouts need review. Plan for a human check on every voucher at first and relax it only for suppliers with a clean history.
Does this work with GST invoices?
Yes, but the bridge must read GSTIN, place of supply and tax breakup and select the right tax ledgers in Tally. Validate the maths and GSTIN format before import, and surface mismatches for review.
Can I keep invoice data off the cloud?
Yes. Run the extraction model and review screen locally. Only the mailbox fetch touches your email provider. The vouchers go to Tally over your LAN.
What if I cannot enable the Tally HTTP port?
Generate voucher files and have a person import them through Tally's import option. It is slower but removes the need for an always-open port, and the review step still works the same way.
Want Email automation working on your TallyPrime?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment