A Healthcare Service Provider Managing High-Volume Monthly Invoicing
The organisation processes Posted Sales Invoices exported from Microsoft Business Central every month, covering multiple entities and customer locations. Each cycle required staff to split combined PDF exports into individual documents, identify the customer and entity on every page, rename each file to a client-approved convention, and file it into the correct location folder, all before the batch could be considered complete.
A Manual, Error-Prone Filing Process Repeated Every Month
Each month, staff worked through the same sequence of manual steps. They had to separate the document into individual invoices, identify the relevant customer or transaction details, rename each file, and place it in the appropriate folder. The process was slow and entirely dependent on manual attention, with repeated data handling creating a real risk of incorrect file names.
Restrictive Download and Batch Limits
Combined PDF exports from the existing Power Automate flow maxed out at 200 documents per batch, forcing staff to manage multiple partial exports instead of one clean file.
Manual Visual Identification
With no automated extraction in place, an operator had to open and read each page to cross-check the customer and entity against business exports before it could be renamed.
Command-Line Renaming, One File at a Time
Once identified, each file was renamed individually using the Windows Command Prompt REN command, a slow, repetitive step with no built-in way to catch a mistyped name.
Manual Folder Creation and Routing
Staff hand-created location folders as needed and dragged each renamed file into place, adding another manual layer between renaming and final filing.
Streamlined a Four-Stage Manual Process into One Automated Run
The new utility runs entirely offline as a single Python script. The script completes a batch of more than 2,000 invoices in less than 30 seconds and writes a live, formula-driven Audit Report.xlsx that cross-checks every renamed file against the source data.
- Combined PDF capped at 200 documents per batch
- Operator reads every page to identify customer/entity
- Files renamed one by one via Command Prompt REN
- Folders created and files dragged into place by hand
- No structured record of what was renamed or where
- Split automatically on run by using Python library (PyMuPDF)
- Automatic text extraction with OCR fallback
- Configurable naming template applied instantly
- Auto-routed to generated entity directories
- Live Audit Report.xlsx cross-checks every file
Less Manual Filing. More Time for Accounting Work.
Automate invoice splitting, naming, and filing with a single offline utility
A Three-Tier Design for One-Click Invoice Renaming and Filing
Whiz Consulting approached the project as a structured automation initiative, using AI to build a solution that processes PDFs locally, standardises invoice names, and routes files to the correct folders while maintaining traceability. The solution addressed specific weaknesses in the original manual chain, with each component feeding into one repeatable monthly workflow executed through three key stages.
Phase 1: Local Setup and Configuration
- Built the utility to operate 100% offline using local libraries, removing any internet dependency or third-party service cost.
- Configured the tool to parse Posted Sales Invoices exported directly from Business Central.
- Defined the naming template <Entity>_<Customer Name>_<External Document No>_.pdf, and the folder structure it maps to.
- Scoped credit notes out for now by business decision, while keeping the underlying logic ready to enable them through a simple configuration change.
Phase 2: Standardised Renaming
- Applied the <Entity>_<Customer Name>_<External Document No>.pdf naming convention to every file automatically.
- Handled Windows filename rules gracefully, converting unsafe characters such as double quotes into underscores.
- Flagged near-matches, for example, a nickname in quotes versus the ledger's formal name, as a recognisable mismatch for quick manual review, without stopping the batch.
Phase 3: Routing, Auditing, and Exception Handling
- Auto-routed every renamed file into its matching, dynamically generated entity folder (e.g., Output \ 1. Invoices \ ).
- Generated a live Audit Report.xlsx using Excel formulas (INDEX/MATCH) to cross-check every renamed file's extracted name against the ledger name, flagging OK, MISMATCH, or NOT FOUND per row.
- Applied race-safe duplicate handling so files are never overwritten; duplicates are saved sequentially (e.g., _DUP1, _DUP2).
- Routed invoices with unrecognised locations to an _UNRESOLVED_ENTITY folder for manual filing rather than blocking the run.
- Detected and logged corrupt or blank pages automatically, skipping them without stalling the batch.
A Faster, Fully Auditable Monthly Filing Process
The utility turned invoice renaming and filing from a recurring multi-hour manual task into a four-step, largely hands-off process. The measurable benefit comes from eliminating manual reading, typing, and folder handling across the full monthly batch while adding a verifiable audit trail.
Three Principles Behind Reliable Invoice Filing Automation
Sustainable invoice filing at scale starts with removing the operator from the repetitive path entirely, not simply speeding up the manual steps that already exist. The gains here came from restructuring the process so reading, typing, and filing were no longer manual tasks at all.
Automate the Full Chain, Not Just One Step
The largest time saving came from connecting splitting, extraction, renaming, and routing into a single run. Automating only the renaming step, for instance, would still leave staff manually splitting files and sorting them into folders.
Keep Every Automated Action Auditable
Speed only matters if the output can be trusted. A live, formula-driven audit report that checks every renamed file against source data turns automation from a black box into a system finance and operations teams can verify at a glance.
Design for Real-World Exceptions, Not Just the Happy Path
Duplicate files, unreadable pages, and unrecognised entities are inevitable at scale. Handling them safely, logging and routing instead of stopping the batch, is what keeps an automated process usable in production rather than just in a demo.