What are parsing rules?
Quick answer
Parsing rules are the instructions inside a document parser that say where to find each field and how to read it. One rule finds the invoice number, another the date, another the totals. Each rule usually becomes one column in the spreadsheet you download.
Last updated
Take the free module →Module 32 of the free AI Apps Worth Knowing course, about 10 minutes. No account needed.
Updated · By Robert Breen
Why it matters for a small business
A parser is only as good as its rules. If the rule for the total grabs the subtotal instead, every row in the spreadsheet is wrong, and nobody notices until a payment is off. Ten minutes spent checking rules on a few real files saves hours of fixing a month of bad data later.
Rules also let you fit the tool to your office instead of the other way round. A starter template covers the common fields, but your team may need something it skipped, such as the vendor name for the payables list or a PO number for matching. Adding one rule fills the gap once, for every future document of that type.
Three rules checked on one invoice
| Rule | How it reads | What it found |
|---|---|---|
| Invoice Number | From the Invoices template | GL-2026-0931 |
| Totals | From the Invoices template | Net 600.00, tax 0.00, total 600.00, confidence 90 |
| Vendor Name | Added by you: Text Fixed Position | Greenleaf Office Cleaning |
In a real lesson: Docparser: Pull Invoice Data from PDFs into a Spreadsheet
In the free Docparser lesson, the Invoices template gives Maple Lane Accounting eight Data Parsing Rules: Invoice Number, Invoice Date, Account Number, PO Number, Phone Number, Email, Line Items and Totals. You open each one and read its Filtered Result against the cleaning company's PDF.
There is no rule for the vendor, so you click Add Parsing Rule, search the rule types for position and pick Text Fixed Position. You rename it from Fixed Text to Vendor Name, because that name becomes the column heading, then draw a box a little wider than the name and click Confirm. After Save Parsing Rule it ran on all three uploaded invoices, and the credits bar stayed at 3/50.

Try this lesson free or read the step-by-step guide.
Common confusions
Fixed position vs variable position
A fixed position rule reads whatever sits inside the box you drew, so it suits fields printed in the same spot every time. Docparser's Text Variable Position looks near an anchor word instead, for layouts that move.
Parsing rules vs an AI prompt
A prompt template asks a model to find the answer each time. A parsing rule is a saved instruction that reads the same place the same way, which is easier to check and repeat.
Tips
- Name each rule the way you want the column heading to read.
- Draw fixed position boxes wider than the longest value you expect.
- Re-check the rules when a vendor changes its invoice design.
Related terms
More Data, Sheets and Gmail terms
Where you use it: free lessons
- Docparser: Pull Invoice Data from PDFs into a Spreadsheet (Docparser, 10 min)
- AI Receipt Extractor: Receipts to Google Sheets with n8n (n8n, 12 min)
AI tools that use it
Frequently asked questions
- What is a parsing template?
- A ready-made set of starter rules for a common document, such as invoices. In Docparser, the Invoices template created eight rules at once; you then check them and add any field it missed.
- What does the confidence number on a rule mean?
- It is the tool's own estimate of how sure it is. Our Totals rule showed 90, which the lesson reads as fairly sure, not certain, so check it against the PDF.
- What if a field is in a different place on every vendor's invoice?
- Use a rule that searches near a label word rather than a fixed box, or make a separate parser for vendors with very different layouts.