Leveraging AI for GST Automation and ReconciliationRecord inserted or updated successfully.
AI & Audit Automation

Leveraging AI for GST Automation and Reconciliation

Author :CA Rahul Gabhawala

Watch on Youtube

Introduction

In the digital age, tax compliance processes demand both precision and speed. Manual reconciliation between GST portal data and accounting books is a time-consuming task that is prone to errors. To address these inefficiencies, I, CA Rahul Gabhawala, presented a live demonstration at the ICAI AI Hackathon Semifinal 1 on 6th June 2025. The demo showcased how artificial intelligence (AI), automation tools, and existing accounting infrastructure can be brought together to create an end-to-end reconciliation and reporting system.

The focus was on three key areas:

  1. AI-powered automation of the GST Portal
  2. Extraction and structuring of data from GST PDFs using Tabula
  3. Integration with Tally ERP using ODBC and VBA-based XML parsing


Part 1: AI-Powered GST Portal Automation

One of the most significant pain points for tax professionals is the manual navigation of the GST portal, especially for repetitive tasks such as downloading returns, checking filing statuses, and collecting invoice-wise data. Using Selenium WebDriver, an AI-assisted automation script was developed to mimic human interaction with the GST portal. This bot could:

  1. Log in to the portal using secure credentials
  2. Navigate dynamically rendered menus
  3. Download monthly returns such as GSTR-2A, 3B, and GSTR-1
  4. Handle session management and re-authentication logic

By combining rule-based navigation and dynamic element identification (XPath, CSS selectors), the bot achieved near-human flexibility in traversing the portal. In future iterations, this system can be coupled with OCR tools such as Tesseract or EasyOCR to bypass visual verification mechanisms like CAPTCHA.


Part 2: Converting PDFs to Structured Data using Tabula

Once GST filings were downloaded, the next step involved reading and interpreting the data — much of which is provided only in PDF format. Manual conversion of PDF data into Excel or CSV is not only inefficient but also error-prone.

To automate this, I used Tabula, an open-source Java-based command-line tool for PDF data extraction. By invoking:

java -jar tabula.jar "GSTR3B.pdf" --pages all --lattice -o "output.csv"

the tool accurately parsed tabular content while maintaining the original column structure. Key highlights include:

  1. Seamless extraction of invoice-level data
  2. Support for multi-page PDFs
  3. Compatibility with Excel for further processing

The resulting CSV was immediately usable for automated reconciliation logic within Excel using VBA and pivot tables.


Part 3: Tally ERP Integration via ODBC and XMLDOM in VBA

To match the GST data with actual accounting records, integration with the client’s accounting software was necessary. For this demo, Tally was used as the source of accounting data. Using ODBC (Open Database Connectivity), I crafted XML-based request envelopes to pull Daybook entries for a specified financial period.

The downloaded data was in XML format, containing complete details of invoices including:

  1. Invoice numbers
  2. Ledger entries
  3. Tax components (CGST, SGST, IGST)
  4. Dates and amounts

To parse and analyze this data, I employed VBA’s XMLDOM object within Excel. This method enabled:

  1. Line-by-line parsing of invoice details
  2. Dynamic filtering and grouping
  3. Linking with extracted GST data for invoice matching

The final result was a powerful, self-contained reconciliation tool built entirely on free and accessible tools.


Consolidated Workflow

Here is a summary of the integrated process:

  1. Automate GST Portal: Extract return data using Selenium
  2. Extract Data from PDFs: Use Tabula to convert downloaded PDFs to CSV
  3. Pull Tally Daybook: Use ODBC + XML to get raw data
  4. Parse and Reconcile: Match Tally entries with GST records in Excel using VBA

This multi-step workflow reduces days of manual effort into an automated process that can be executed in under an hour, depending on data volume.


Benefits and Future Potential

  1. Time Efficiency: Reduces manual work from hours/days to minutes
  2. Accuracy: Eliminates copy-paste errors and human oversight
  3. Scalability: Adaptable to handle multiple clients or branches
  4. Cost-Effective: Built on open-source and readily available tools

In future developments, this system can be enhanced with:

  1. Cloud-based dashboards
  2. AI-powered anomaly detection
  3. Email/SMS-based discrepancy alerts


Conclusion

This demonstration exemplifies the power of AI and automation when integrated with traditional accounting tools. It reflects the evolving role of Chartered Accountants as not just compliance professionals but as digital solution architects. The approach presented is not limited to GST alone — it can be adapted to other compliance areas such as TDS, ROC filings, or bank reconciliations.

The positive feedback received at the ICAI AI Hackathon validates the need for such innovations in our profession. With continuous refinement, these solutions can empower firms of all sizes to offer faster, smarter, and more accurate compliance services.