- Document automation
- Legal
- Case study
How we cut contract drafting from 45 minutes to 90 seconds
How a law firm automated 10,000+ standard contracts a month with template logic, CRM data and PDF/Word output, and what any legal team can learn from it.
Key result
45 min → 90 s
drafting time per contract, at 10,000+ documents a month
A law firm we work with in Kosovo drafts a high volume of standard contracts every month: NDAs, employment agreements and service contracts. Each one needs personalised details, the right clauses for the jurisdiction, and a clean PDF ready for signature.
Before automation, paralegals spent most of their working day filling in Word templates by hand. A typical contract took around 45 minutes. After an 8-week project, the same contract takes under 90 seconds, and the firm now produces more than 10,000 documents a month without adding staff.
This article explains how that system works, why the approach matters more than the tools, and how to tell whether your own team is ready for document automation.
The real problem was not typing speed
When we first looked at the firm's process, the time cost was obvious. The risk was less obvious, and more important.
Each contract was assembled by copying the right template, replacing client details, then deleting or adding clauses depending on the contract type and jurisdiction. Every one of those steps relied on a person remembering the rules correctly, and every copy-paste was a chance to leave in the wrong party name, the wrong governing law or an outdated clause.
In legal work, a small inconsistency is not a typo. It is liability. So the goal was never just "make it faster". It was:
- Consistency: the same inputs must always produce the same, correct document.
- Traceability: it must be clear which template version and which rules produced each contract.
- Reviewability: lawyers must stay in control of what leaves the firm.
How the system works
The solution has four parts. None of them is exotic; the value is in how the rules are modelled.
1. Structured intake from the CRM
The firm already captured client and matter details in its CRM. Instead of retyping that data, the engine reads it through the CRM's API: party names, addresses, contract type, jurisdiction, dates and commercial terms.
Reading from the source system removes retyping, which is where many errors start. A good engine should also refuse to generate a document when a required field is missing, rather than produce a half-filled one.
2. Templates with explicit clause logic
The firm's approved Word templates were converted into structured templates using Jinja2, a widely used templating language. The important part is that the rules that used to live in people's heads are now written down:
- which template variant applies to which contract type,
- which clauses are included for which jurisdiction,
- which optional clauses depend on commercial terms.
A simplified example of what a clause rule looks like:
{% if contract.jurisdiction == "Kosovo" %}
{% include "clauses/governing_law_kosovo.j2" %}
{% else %}
{% include "clauses/governing_law_default.j2" %}
{% endif %}Because the logic is explicit, it can be reviewed by the people who actually own the legal content, not just inferred from sample outputs.
3. PDF and Word output
Every run produces two files: a court-ready PDF generated with WeasyPrint, and an editable Word version for partner review. Lawyers review the Word file when they need to; the PDF goes out for signature.
4. An internal web tool and a webhook
Staff generate documents from a simple internal web tool: choose the matter, check the data, click generate. The same engine is also exposed as a webhook, so the CRM can trigger document generation automatically at the right stage of a matter.
What changed
The outcomes, measured against the process before the project:
- Average drafting time for a standard contract fell from about 45 minutes to under 90 seconds.
- Errors on standard contracts dropped to effectively zero, because the rules are applied the same way every time.
- The firm processes 10,000+ documents a month with no additional headcount.
- Paralegals moved from data entry to review and client-facing work.
The biggest change was not speed. It was that the firm can now trust every standard contract to be built the same, correct way.
Principles we apply on document automation projects
Run old and new side by side
Before switching over, produce documents both ways and compare them until they match. A parallel run is the fastest way to build trust with the people who sign off on the documents.
Subject-matter experts own the rules
Engineers should not decide which clause applies where. Lawyers, underwriters or HR specialists do. The engineering job is to turn their rules into logic that can be reviewed, tested and changed safely.
Version templates like code
Template changes should be reviewed and previewed before they go live, so a clause update never silently changes documents in production.
Is your team ready for document automation?
Document automation pays off quickly when most of these are true:
- You produce the same types of documents repeatedly: contracts, offers, reports, certificates.
- The data already exists somewhere structured: a CRM, a form, a database or even a consistent spreadsheet.
- The rules for which text goes where can be written down, even if today they live in people's heads.
- Errors are costly: legal exposure, compliance issues or lost time correcting them.
If several of these apply, start small: pick the single highest-volume document type, write down its rules, and automate that one end to end before expanding.
Frequently asked questions
Do lawyers lose control over what is sent?
No. The system produces an editable Word version for review alongside the PDF, and nothing has to be sent automatically unless the firm chooses to.
What if a template needs to change?
Authorized staff edit the template, preview the result and publish it. Keeping templates under version control means every change is reviewable and reversible.
Does this only work for law firms?
No. The same approach works for any team that fills in rule-based documents from data, including insurance, HR, finance and sales teams producing offers or certificates.
If your team spends hours filling in the same documents, see how our document automation service works or read the full case study. When you're ready, book a 30-minute call and we'll look at your highest-volume document together.