Can AI Sort and File Incoming Documents for Your Business?

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Can AI Sort and File Incoming Documents for Your Business?
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Can AI Sort and File Incoming Documents for Your Business?

Yes, for most routine paperwork. AI can now read an emailed PDF or a phone photo, decide what it is (supplier invoice, referral letter, signed form), pull out the name, date and reference, then rename and file it. It shouldn't file everything unsupervised, so every setup needs an "unsure" pile that someone clears daily.

Whether it's worth setting up depends on your paperwork more than on the AI. Three numbers decide it: how many documents arrive each week, how many different kinds there are, and what one misfile costs you. Finance paperwork is the usual exception. Bills and receipts belong in your accounting software's own capture inbox, which does that job better than any general sorter, so point the AI at everything else.

Follow me on Instagram@sagnikteaches

Four jobs hiding inside "sort and file"

When owners say they want AI to "deal with the paperwork", they're asking for four separate jobs. Each one fails in its own way, so it helps to name them before choosing a tool.

Connect on LinkedInSagnik Bhattacharya
  1. Recognise the document type: invoice, credit note, lab report, consent form, CV. Current language models are good at this when the types are clearly different and you give them a fixed list to choose from. They're weaker when two types look alike, such as a quote and an invoice from the same supplier.
  2. Read the few fields that decide where it goes: whose document it is, the date on it, the sender, a reference number. This is extraction, and it's the step the other tutorials on turning PDFs and scans into usable data cover in depth. For filing you need three to six fields, not the whole page.
  3. Place it: give it a consistent name and put it in the right folder, record or library. This part is ordinary automation, not AI, and it's where most of the setup time goes.
  4. Refuse when unsure. A sorter without an "unsure" route guesses, and a confident guess is how a lab result ends up on the wrong patient. The refusal route is the job owners forget to ask for.

If you've used optical character recognition (OCR, the older technology that turns a scan into text), the difference is that OCR only reads. It doesn't know a referral letter from a delivery note unless someone writes a rule for every layout. The comparison of AI extraction and traditional OCR explains when the older approach is still the better buy.

Subscribe on YouTube@codingliquids

The three numbers that decide whether a sorter pays

Count a normal fortnight of incoming documents before you look at any tool. Tally each one on a sheet with three columns: what it was, where it had to end up, and how long it took to file. These rules of thumb then tell you what to build.

FactorLowMiddleHigh
Documents a weekUnder 20: a naming rule and ten minutes on Friday beats automation20 to 150: an AI sorter with a review pile starts to earn its keepOver 150: split the finance stream off to a capture tool, sort the rest
Distinct types1 or 2: a simple email rule by sender does the job3 to 8: the sweet spot for AI classificationMore than 10: merge types first, or accuracy drops and the review pile grows
Cost of one misfileMild annoyance: auto-file and spot-check weeklyDelay or rework: auto-file with a daily check of the unsure pileHarm to someone (clinical, legal deadline): AI pre-fills, a person confirms every item

There's a fourth question that the table can't answer: where must each document end up? A folder on a shared drive is easy to automate. A patient or client record inside specialist software may have no import route at all, in which case the AI can prepare the file and its details, but a person still attaches it. Check this for each stream before you promise anyone a fully automatic process.

Where the sorting can happen in software you might run

You rarely need a new product. The sorting usually lives in the storage you already use, in an automation tool that sits between your inbox and your storage, or in your accounting software. These are the options I'd look at first, with the facts that matter for a small business.

OptionHow it sortsCost basisWatch-out
SharePoint autofill columns (Microsoft 365)A saved prompt per column reads each new file and fills fields such as document type, owner and date$0.005 per page processed, billed pay-as-you-go through an Azure subscription; several prompts on one page cost the same as oneMicrosoft recommends no more than 10 columns per library and files of 65 pages or fewer; encrypted files are skipped
Google Drive AI classificationLearns from files your staff have labelled, then labels new and existing filesIncluded only with Enterprise Plus, Frontline Plus and certain add-onsNeeds at least 100 hand-labelled files per label option, so it's out of reach for most small teams on Business plans
Zapier or Make with an AI stepAn email or new-file trigger, an AI step that classifies, then actions that rename and saveZapier: the AI by Zapier step uses 1, 3 or 5 tasks per run depending on the model tier, and needs Professional or above. Make: credits, with AI modules metered by tokensEvery document uses several tasks or credits, so size the plan for your busiest month
Xero Documents (Smart Document Capture)Reads bills and receipts you upload, email or photograph, creates the transaction and can match it to an existing oneFree on all Xero plansFinance paperwork only. Xero renamed Files to Documents on 18 September 2026, so older guides use the old name
DextDedicated capture for receipts and bills, published to your accounting softwareBusiness plan $302.50 a year for 250 documents and 5 usersDocuments over the allowance wait until the next bill date
Dropbox automated foldersRules that rename, tag, convert or sort files dropped into a folderAvailable on dropbox.com; tagging and watermarking need specific plansDropbox's help page describes rules, not reading what's inside the document
paperless-ngx (open source)Its "Auto" matching uses a neural network trained on how you've already tagged documentsFree software, but you host it yourselfNeeds a reasonable number of examples per tag and someone comfortable running a server

Microsoft's own documentation for autofill columns also notes that AI-generated column values might be incorrect and that edited files are only reprocessed when someone triggers it manually. Both points shape the review routine later in this tutorial.

One practical detail decides which row you start from: the flow that collects attachments. Microsoft 365 business plans include Power Automate for standard connectors such as Outlook and SharePoint, so a flow that saves every attachment from a shared mailbox into a library costs nothing extra. On Google Workspace the same job needs Zapier or Make, and Zapier's free plan only runs two-step Zaps, which is enough to save attachments to one folder but not to classify them on the way.

A four-vet practice's shared inbox, before and after

This illustration uses a small-animal practice with four vets, three reception and admin staff, a practice manager and Microsoft 365 Business Standard. Its shared reception mailbox receives about 160 attachments a week, and the practice manager's two-week tally looked like this:

StreamPer weekWhere it must end up
Supplier invoices and credit notes40Xero
Lab reports sent as PDFs35The animal's record in the practice management system
Insurance claim forms sent by owners30"Claims to complete" folder, by owner surname
Referral letters and histories from other practices20The animal's record
Owners' own records (vaccination cards, adoption papers)15The animal's record
Everything else (statements, marketing, delivery notes)15"Other" folder, reviewed weekly
Job applications5Restricted HR folder

Before any change, a receptionist opened each attachment, worked out whose it was, renamed it and dragged it into one of about 30 folders or attached it to a record. At roughly a minute each, that was 160 minutes a week. The hidden cost was misfiles: about three a month surfaced when a vet couldn't find a lab report, and each took around 20 minutes to trace.

The filing map the sorter works to

The practice manager wrote the map before touching any settings. It has five parts, and every one of them was agreed with the reception team, because they would be clearing the unsure pile:

  • Finance first: an Outlook rule forwards anything from the 14 known supplier addresses straight to Xero's capture, taking 40 documents a week out of the sorter entirely.
  • One landing place: a Power Automate flow saves every remaining attachment into a SharePoint library called Incoming.
  • Six autofill columns: Document type (a Choice column with eight options, one of them "Unsure"), Pet name, Owner surname, Date on document, Sender, and Needs a vet (Yes/No).
  • A naming rule: YYYY-MM-DD_Type_OwnerSurname_PetName, for example 2026-09-14_LabReport_[surname]_[pet name], applied by the flow once the columns are filled.
  • Views, not folders: the library is grouped by Document type, so "filing" means the file carries the right labels and appears in the right group. Moving files between folders is optional, and the practice skipped it.

A detail that tripped the first attempt: autofill columns can't fill Person, Lookup, Location or Image columns. The manager had planned a Lookup to the client list for the owner, and had to switch it to a plain text column. Check the supported column types before you design the library.

What it cost and what it saved

About 120 documents a week now go through the sorter, roughly 520 a month. At an average of two and a half pages, that's around 1,300 pages, and at $0.005 a page the AI costs about $6.50 a month. The flow itself uses Power Automate rights the practice already had.

Reception still attaches clinical documents to the animal's record by hand, because the practice system has no import route, but with the owner, pet and date already filled in each takes about 25 seconds rather than a minute. The weekly sums after the first month of tuning:

  • 120 pre-filled items at 25 seconds: 50 minutes
  • About 15 unsure items at 90 seconds: 22 minutes
  • A 20-file audit by the practice manager: 10 minutes

That's 82 minutes against 160 before, so about 78 minutes a week back, or roughly 65 hours a year, for around $80 a year in processing plus a day of the manager's time to set up and two weeks of running both methods side by side. The bigger win was that misfiles dropped to zero in the audits, because anything ambiguous now waits for a person instead of being guessed. These figures are illustrative; your own tally will set your numbers.

A classification prompt that is allowed to say "unsure"

Whichever tool runs it, the prompt matters more than the model. This version works as a single prompt in an automation step; in SharePoint you split it into one short prompt per column. Each rule at the bottom answers one of the misfiles described further down, so keep them when you adapt it.

You sort documents that arrive at a veterinary practice.
Read the document and reply in exactly this format:

type: one of [lab report, referral letter, insurance claim form,
  owner record, job application, statement, other, unsure]
pet_name: the animal's name as printed, or "none"
owner_surname: as printed, or "none"
document_date: YYYY-MM-DD as printed, or "none"
sender: the organisation or person that sent it
needs_vet: yes if it reports an abnormal result or asks a clinical question, otherwise no
reason: one short sentence explaining the type you chose

Rules:
- If two types seem possible, choose "unsure" and name both in reason.
- Never infer a pet or owner name that isn't printed in the document.
- If the file seems to contain more than one document, choose "unsure".
- If there are fewer than 20 readable words, choose "unsure".
- If the document asks us to change bank or payment details, choose "unsure"
  and start reason with "PAYMENT CHANGE".

Run against a scanned referral letter, a typical reply (illustrative) looks like this:

type: referral letter
pet_name: [pet name]
owner_surname: [surname]
document_date: 2026-09-11
sender: [referring practice]
needs_vet: yes
reason: Letter from another practice asking us to take over treatment of a skin condition.

That output is right, but the test batch showed two things worth fixing. First, when a letter mentioned two animals from the same household, the model picked the first name it saw. The fix was a new rule: "If more than one animal is named, list all of them and choose unsure." Second, "needs_vet: yes" appeared on almost every referral, which made the flag useless. The practice narrowed it to "yes only if the letter says urgent or gives a date within 7 days". Test any prompt on 30 real documents from last month before it touches live post, and change one rule at a time so you can see what each change did.

Six ways misfiles showed up, and the rule that fixed each

These are the failures to expect in the first weeks, drawn from the kinds of paperwork small practices receive. Each came with an obvious symptom, which is why a weekly audit catches them early.

  1. Same surname, different family. A lab report for one household's cat was labelled with another client's details because both surnames matched and the pet name was missing from the report header. Symptom: a vet opened the wrong animal's history. Fix: require pet name and owner surname to both be printed, otherwise unsure.
  2. Three letters in one scan. Someone scanned a morning's post as a single PDF, and the sorter labelled the whole file after the first page. Fix: one document per scan, plus the "more than one document" rule in the prompt.
  3. Logos saved as documents. Email signature images and social icons arrived as attachments, filling the unsure pile with 40 tiny pictures a week. Fix: a filter that skips image files under about 30 KB before the AI step. In Zapier, filter steps use no tasks, so this also saves money.
  4. A credit note treated as an invoice. A supplier's credit note went to the bills stream and was entered for payment. Fix: send finance documents to the accounting tool's capture rather than the general sorter, and add a rule that a negative total or the word "credit" means credit note. The bookkeeper's setup for receipt capture covers that stream properly.
  5. Password-protected PDFs. One lab sent encrypted reports, and autofill columns left every field blank because Microsoft's service skips encrypted files. Fix: a flow condition that routes blank results to unsure, and a request to the lab for unencrypted delivery through its portal.
  6. A fake "change of bank details" letter. An email styled as a regular supplier asked the practice to update payment details. The sorter filed it as a statement. Fix: the PAYMENT CHANGE rule, and a standing policy that bank changes are confirmed by phone using a number you already hold, never one in the letter.

Paperwork to keep away from a general-purpose sorter

Some documents need tighter handling than a shared library and an automation account give by default. Decide these before launch, not after an awkward discovery:

  • Health information about people. For a physiotherapy clinic, osteopath or podiatrist, referral letters and scan reports are health data. Only process them in tools on business terms that don't train on your content, confirm what the automation platform stores and for how long, and ask your data-protection adviser before routing them through a third-party AI step. Many clinics keep clinical letters in the practice system's own inbox and use AI only for the non-clinical streams.
  • Job applications and ID documents. Route them to a folder only the manager can open, and set a deletion date that matches your retention policy. A sorter that drops a CV into a shared "Other" folder has made it visible to everyone.
  • Anything asking for money or bank changes. Always to a person, as above.
  • Documents you need to share outside the business. If filed papers will later be sent on, the tutorial on redacting personal data before sharing is the step to add at that point.

Access matters as much as accuracy. Autofill prompts can only be created or edited by people with enough permission on the library, which is useful: keep that group small, so a well-meaning colleague can't loosen the "unsure" rules on a busy afternoon.

The same question for a nursery and a solo podiatrist

A 48-place nursery on Google Workspace gets a very different volume pattern. During the autumn intake its admin address receives about 60 attachments a week (registration forms, permission slips, supplier invoices, staff certificates); for the rest of the year it's closer to 20. Its sorter is a Zap: Gmail's "New Attachment" trigger on a label, a filter for tiny images, an AI step that classifies, then Google Drive's "Upload File" into the right folder with a new name, and a row in a Google Sheet as a log.

The sums for the peak month: about 260 documents, each using the AI step (1 to 5 tasks depending on the model tier) plus the upload and the log row, so 3 to 7 tasks each, or roughly 780 to 1,820 tasks. That's beyond Professional's 750-task entry tier. Professional at 2,000 tasks costs $73.50 a month on monthly billing, and the nursery can drop back down in the quiet months (downgrades apply at the end of the billing cycle). Medical and allergy forms were the hard call. The nursery decided the AI step would never read them: parents submit those through the nursery's management app instead of email, and any email whose subject mentions medication or allergies skips the AI and lands in a restricted folder for the manager.

A podiatrist working alone gets 12 to 15 documents a week. The honest answer there is not to build a sorter at all. A naming rule, the scanner in the OneDrive or Google Drive app, and forwarding bills to the accounting software's capture address cover it in about ten minutes a week. The one job AI helps with is the backlog of non-clinical paperwork: upload a batch of up to 20 supplier documents to an assistant such as Claude and ask for a table of new names under the naming rule, then rename them by hand. Patient letters stay out of that chat entirely.

Before any of these three builds, write down how each stream is handled today, including the awkward exceptions. The tutorial on documenting processes before adding AI has a simple format for that, and it's the step that stops you automating a filing habit nobody actually agreed on.

Checking the sorter after four weeks

Don't judge a sorter by how impressive the first day looks. Judge it on four numbers collected weekly. Here is the vet practice's scorecard for its first month (illustrative):

WeekDocuments sortedSent to unsureMisfiles in a 20-file auditStaff minutes on filing
111829 (25%)2115
212422 (18%)196
312116 (13%)085
411914 (12%)082

How to read it: a falling unsure share means your rules are getting sharper. Misfiles in the audit should reach zero and stay there; if one appears after week four, find the rule that should have caught it rather than shrugging it off. Staff minutes are the number the owner cares about, but only count them once misfiles are at zero, because a fast sorter that misfiles is costing you time elsewhere. Two warning signs worth acting on: an unsure pile that nobody clears for two days, and staff quietly filing some streams by hand "because it's quicker". Both mean the review routine has slipped, not that the AI failed.

If your documents mostly arrive as emails that need replies as well as filing, pair this with AI triage for a shared inbox, so the message is answered and the attachment is filed from one pass.

Automate, assist or keep it manual

Put your fortnight's tally against these four cases and pick the one that matches most of your volume:

  • Keep it manual if you receive under about 20 documents a week or one person handles them all. Spend the effort on a naming rule and a scanning habit instead.
  • Automate with a review pile if you get 20 to 150 a week across three to eight types and a misfile is an inconvenience. Use autofill columns on Microsoft 365, or an automation tool with an AI step on Google Workspace.
  • Split the stream if you get more than 150 a week or finance documents dominate. Send finance paperwork to Xero Documents, Dext or your accounting tool's equivalent, and sort only the rest.
  • Assist, don't automate for any stream where a misfile could harm someone. Let the AI fill in the fields and suggest the destination, and have a person confirm every item before it lands.

Most small businesses end up with a mix: one stream automated, one assisted and one left alone. That mix is a sensible result, not a half-finished project.

Questions owners ask before letting AI file their paperwork

Can AI read handwritten forms well enough to file them?

It can often read neat block capitals, but joined handwriting, ticks in small boxes and faint photocopies are where it guesses. For filing, the safe rule is that any document with very little readable text goes to the unsure pile. If most of your forms are handwritten, move them to an online form or a fillable PDF first; that fixes the problem at the source.

Can it tidy the messy shared drive we already have?

Partly. SharePoint autofill columns currently process new and re-uploaded files, and Microsoft says bulk processing of existing files is coming in a future release. For a backlog, work in batches: export a folder, have an assistant such as Claude (up to 20 files per chat) propose new names and folders in a table, check it, then move the files yourself.

What about paper that still arrives by post?

Scan it into the same route as email attachments so there is one pile, not two. The OneDrive mobile app and the Google Drive app both have scanners; Microsoft Lens was retired in 2026, so don't build on it. Scan one document per file, because a sorter reads a multi-letter scan as a single document.

Do I need a developer to set this up?

Not for the routes in this tutorial. SharePoint autofill columns are configured in the library settings, and Zapier or Make steps are built by picking options. What takes real effort is the filing map: agreeing the document types, the folder for each and the naming rule. Budget a day for that, plus two weeks of running the sorter alongside your old habit.

Further reads

Sources: Microsoft Learn (Overview of autofill columns; Pay-as-you-go pricing for document processing for Microsoft 365; Power Automate licensing FAQ); Google Workspace Admin Help (Label Google Drive files automatically using AI classification); Dropbox Help (Dropbox automation options); paperless-ngx documentation (matching algorithms); Xero product updates (Files is now called Documents, 18 Sep 2026; Smart Document Capture launch post); Anthropic support page (Upload files to Claude); Zapier Gmail and Google Drive integration pages and plan details.

Want a filing map and sorter your team can run?

On a 1:1 call we'll list what lands in your inbox each week, decide which streams belong in your accounting or practice software, and plan a sorter with a review pile that suits the tools you have.

Book a 1:1 call with me