ChatGPT as the automation platform: 90% reduction in routine data manipulation and analysis

Problem Statement

Each month, the sales tax team was forced to run a gauntlet of manual data work. Two Excel workbooks, each containing over 200,000 rows, needed to be reconciled. The files both contained transactional data, one as the source of truth, the other an extracted report from a different system, full of possible mismatches. The process required more than 100 precise clicks to filter, cross-reference, and isolate discrepancies. Any misstep from the process document could mean hours lost to rework, or worse, significant uncaught errors sent downstream. 

Upstream the two systems weren’t properly connected, and the prospect of a technical fix was impossible. For the tax team, this tedious monthly cycle was a source of operational risk and burnout, and typical of the kinds of data manipulation and cleansing tasks required before our “tax work” could begin.

Solution

Previous attempts at writing macros failed owing to the author’s lack of VBA programming capabilities. We took a different path and used ChatGPT as the automation platform. The team’s step-by-step process document was converted into a detailed prompt (excerpt below). The LLM generated and executed the necessary Python code directly on our uploaded Excel files. This automated the full sequence, data filtering, existence and completeness checks, and output an exception report in .csv, all without leaving the desktop. 

What had once been a painstaking manual exercise now unfolded as a single guided workflow: prompt, upload, review, and extract the exception report for upload elsewhere.

Results

The impact was immediate. The monthly data prep process dropped from over 100 clicks* to about 20, and the task took a fraction of the original time. Critical errors, previously caused by fatigue or missed steps, virtually disappeared. The team regained hours each cycle, and with no reliance on new IT platforms or licenses, the solution fit seamlessly into existing workflows. What used to be a dreaded manual grind is now a streamlined, mostly automated routine. This is a small step in the reinvention of workflows; using an LLM as an operating system capable of executing programs (prompts).

StepLegacy ProcessPartial-Automation
Data filtering actionsManual (100+ clicks)Automated (Prompt + 20 clicks)
Error RiskHigh – easy to misstepVery low, LLM follows SOP
Hours per cycle~2+~0.25
Exception ReportMulti-step, error-proneAuto-generated, upload-ready

*Clicks = every mouse click, every keyboard shortcut (ex: ctrl-c, ctrl-v = 2 clicks; formula writing = 1 click), tab creation, tab switching, adding columns and rows, etc.

What Made This Approach Different

Most teams turn to an LLM to write code they put to further use, but in this project, we used the LLM as the automation platform itself. After struggling to build the right Excel macros by hand, especially for a multi-stage, error-prone process, the author realized that scripting each step was less practical than treating ChatGPT as an “operating system” for automation.

While it’s true that modern AIs are increasingly reliable at writing accurate Python code, the traditional workflow (spec the macro, test, revise, debug) is still demanding when the spec itself is complex. Instead, the breakthrough was to convert our entire process documentation, step-by-step, into a clear and comprehensive prompt. This let the LLM generate exactly the code we needed, run it, and avoid all the piecemeal manual stringing-together of scripts or macros.

Handling the Risk of Hallucination

There’s a fair concern about AI “hallucinating” outputs, but here, that risk was nearly zero. Modern AI models, when tasked with generating Python code (and given clear, explicit instructions), don’t hallucinate facts, they generate the logic exactly as described. The key is precision: our prompt left no ambiguity and no room for creative “filling in the gaps.” Every transformation, filter, check, and exception rule was spelled out. The LLM did the heavy lifting as an automation engine, not a content creator. This is how we achieved both speed and reliability, even in a messy, repetitive workflow.

Alternatives:

There are different ways to approach such an automation, and I would change my approach for similar projects depending on the particular department’s capabilities and constraints. Some steps could be automated through an RPA style script to run on schedule.  Other approaches could use Power Automate to pull the excel data from their saved locations, run the reconciliation logic, then download the template back into the document management system, ready for review prior to upload. Personally, I like the idea of a fully on-platform custom-GPT with “actions” that call a JSON stored code snippet to execute the steps.

Next Steps

The reality is that few departments have the ability to write these locally run micro-applications and IT will be hesitant to give you approval to run code locally. In the absence of permissions and other enterprise tools, running such a prompt (or program) on an LLM doesn’t require approval and is a simple step towards automating small processes.

Excerpt of the prompt.

**ChatGPT Prompt: Exception Validation Between Billing and XXXXXXData**

### Objective

Identify every transaction in the monthly XXXXXXEngine report that does **not** exist in the monthly Billing Processor report, matching on the shared **Document Number** field.

### Prompt Flow

1. **User Invocation**

* Paste this entire prompt into ChatGPT.

* Attach the two Excel files: `BillingProcessor_YYYYMM.xlsx` and `XXXXXXEngine_YYYYMM.xlsx`.

2. **ChatGPT Processing**

* Reads in both spreadsheets.

* Applies country and nexus filters.

* Excludes transactions per document‐type rules.

* Performs an anti-join on the `Document Number`.

* Builds an exception report template.

3. **ChatGPT Response**

* Returns a DataFrame or table of unmatched document numbers.

* Populates the exception template using the specified column codes.

* Provides instructions on how to save, name, and distribute the output.

### Standard Operating Procedure (SOP)

* **When to Run**

* Note to user: On the 5th business day of every month, after the month-end data dump is complete and after the last dunning cycle has run.

* **Prerequisites**

* Place two files in `\\Data\Reconciliation\YYYY\MM\`:

* `BillingProcessor_YYYYMM.xlsx`

* `XXXXXXEngine_YYYYMM.xlsx`

* Confirm that each file contains at least these columns (exact casing):

* `Document Number`

* `CountryCode`

* `ProvinceOrState`

* **How to Use**

1. Open a ChatGPT session with code execution enabled.

2. Copy and paste this prompt into the chat.

3. Upload both Excel files when prompted.

* **Execution Steps for ChatGPT**

1. **Load Files** into Python (Pandas) or your spreadsheet tool.

2. **Filter by Country**

* Billing file: keep `US`, `CA`;

* XXXXXX file: keep `USA`, `CAN`.

3. **Filter by Nexus**

… REMAINDER OF PROMPT NOT INCLUDED 

Leave a comment