What the flow looks like, from received invoice to booked entry
If you want to automate invoice processing with AI, it is wise to see the whole flow first, because AI should only be used at the steps where it is needed. A typical flow for supplier invoices has six steps, and they work the same whether you have five invoices a week or five hundred.
What distinguishes a small or mid-sized company from a large organisation is seldom the steps, but the tools. You may have a cloud accounting program and a mailbox where invoices arrive, but no large business system. It is still possible to build a working flow with an automation tool that ties together email, reading, coding and the accounting program.
An example: an accounting firm that receives supplier invoices on behalf of twenty clients has the same six steps, but with an extra question in each: which client does the invoice belong to? There, matching to the right client and the right bookkeeping becomes part of the flow, and email addresses per client can simplify the work. The point is that the steps are the same, only the keys differ.
- Receive: the invoice arrives through a dedicated email address, e-invoice or upload.
- Read: supplier, invoice number, date, amount, VAT and payment details are extracted.
- Match: the invoice is linked to the supplier and, where needed, to an order or purchase.
- Coding suggestion: a suggestion for account, cost centre and VAT code is produced.
- Approval: the right person approves. Deviations stop for manual handling.
- Book and archive: the entry is booked, the original is kept and the payment is set up.
Where AI is actually needed, and where ordinary rules suffice
A common misconception is that the whole flow requires AI. It does not. Large parts can be solved with simple rules, and that is better, because rules are predictable, cheap and easy to debug. AI should be used where variation is large and rules are not enough.
Invoices come in hundreds of different layouts. The amount sits in different places, VAT is stated in different ways and some are scanned images in poor condition. This is where AI helps, because it understands the document wherever on the page the details sit. The second place is coding of invoices that do not resemble earlier ones, where a language-aware suggestion saves time.
- Rules suffice: receiving email, extracting attachments, checking that the invoice number does not already exist, checking that the amount matches the order, sending an approval reminder.
- Rules plus lookup suffice: recurring suppliers with fixed coding, where the account is stored per supplier.
- AI is needed: reading invoices in varying formats, interpreting line text, suggesting coding when the supplier or item is new.
- A person is needed: approving new suppliers, changed bank details, deviating amounts and anything that does not add up.
TipMeasure what share of invoices come from suppliers you already have. For many companies it is a large majority, and then simple rules suffice for that part.
Steps 1 and 2: receive the invoice and read it
Start with a clear entry point. Create a dedicated email address for supplier invoices, for example a mailbox that only the automation reads, and ask suppliers to send there. Invoices that arrive as e-invoices, for example via Peppol, already have structured data and need no reading at all. Use that when you can, because it is more reliable than interpreting an image.
For PDFs and images, reading is needed. It can be done with traditional OCR, which turns an image into text, and a language-aware step that then extracts the right fields and returns them in a fixed format. The combination handles varying layouts better than templates for each supplier. Have the reading state how confident it is for each field, so that uncertain invoices can be stopped.
Keep the original file. Under the Bookkeeping Act, electronic documents containing accounting records that have been received must be kept in the format and with the content they had when they arrived. Always save the original unchanged, alongside the extracted details.
Steps 3 and 4: match and suggest coding
Once the details have been extracted, the invoice must be linked to the right supplier. Use organisation number or bank giro number as the key instead of the name, because names are spelled differently. If the supplier is new, the flow stops and a person gets to set it up, and here the bank details in particular should be checked.
If there is an order or a contract, the invoice should be compared with it. If amount and quantity match within an agreed margin, it can move on automatically. If it deviates, it goes to whoever placed the order.
Then comes the coding suggestion. For recurring suppliers it is enough to look up what was booked last time. For new or unusual invoices, AI can read the line text, look at earlier bookkeeping and suggest account, cost centre and VAT code, with a short rationale. The suggestion should be just that, a suggestion, and what a person changes is valuable feedback to learn from.
A concrete example of a coding suggestion: an invoice from a company you have not bought from before, with the line text ”Hire of mini excavator, 2 days”. A language model can there suggest an account for machinery hire, linked to the right project if the project number is in the text, and indicate that it is unsure about the VAT code. The suggestion goes to a person who changes or approves it, and next time the supplier is in the register.
Steps 5 and 6: approval, booking and archiving
Approval is a control point, not an obstacle. Have the automation send the invoice to the right approver, with a summary and the coding suggestion, and remind them if it stays unapproved. Set amount limits where a second person must approve. Small amounts from well-known suppliers can often go through with lighter approval, but you should decide that yourselves and document it.
Then the voucher is booked in the accounting program through its interface. Under the Bookkeeping Act every business event must have a voucher, and the voucher must among other things state when it was compiled, when the event occurred, what it concerns, the amount and the counterparty, and have a voucher number or other identifier. Make sure your flow provides those details.
Accounting records must be kept for seven years after the end of the calendar year in which the financial year ended, and stored in Sweden in an orderly condition. There are exceptions for storage abroad under certain conditions. Check the rules with the Swedish Tax Agency or your accountant before choosing where data is stored. This is general orientation and not advice on your own accounting.
Risks and limits: what a person should still review
Automating invoices reduces errors, but also moves the risk. The most dangerous scenario is a fraudulent invoice passing unnoticed, more than AI reading the wrong amount. Fraudsters send invoices with changed bank details or for goods you never ordered, and an automated flow that approves everything that looks right helps them.
So the flow should have built-in checks and clear stops. Anything that departs from the pattern should stop and be visible, instead of passing through silently.
- New supplier or changed bank giro, plus giro or account number: stop and verify via a known phone number.
- Amount above a set limit: require manual approval.
- Duplicates: check invoice number, supplier and amount against earlier ones.
- Low confidence in the reading: send to manual review.
- VAT does not match amount or country: stop.
- Everything the flow does should be logged, so that you can trace every entry.
TipRun the flow in parallel with manual handling for a few weeks. Compare the results invoice by invoice before you let the automation in for real.
Build a flow without a large business system
You do not need a large business system to get started. A flow in an automation tool such as n8n can read email, send attachments to a reading service, look up suppliers in your system, call a language model for coding suggestions, send an approval request and post the voucher through the accounting program's interface. It can be built step by step, one step at a time, and each step can be measured along the way.
Start with a small part. A good first step is to automate only receiving and reading, and let a person still approve and book. Once that works, coding suggestions can be added, and last the booking for the suppliers and amounts where you trust the result.
At Walldy we build automations and integrations of this kind and connect email, finance systems and AI with the tools you already have. We also provide training for those who will work with the flows, so that the finance team understands what the automation does and can adjust it themselves.
Follow up the flow with a few simple measures: what share of invoices go through without manual handling, how often the coding suggestion is changed and how long it takes from received invoice to booked entry. Those are the measures that show whether the automation actually saves time and where the next improvement should be made.
FAQ
Can AI book invoices automatically?
Technically yes. AI can read the invoice and suggest coding, and a flow can post the voucher in the accounting program. In practice it is best to start with suggestions that a person approves and to allow automatic booking only for recurring suppliers where the result has proved reliable.
What is the difference between OCR and AI for invoices?
OCR converts an image or PDF to text. AI, in the form of a language model, can then understand the text and extract the right fields, even when the layout varies. The two are often used together.
Can you automate invoice processing with n8n?
Yes. n8n can read incoming email, send attachments for reading, call a language model, fetch data from and write to your accounting program and send approval requests. The possibilities depend on which interfaces your accounting program offers.
How long must invoices be kept?
Under the Bookkeeping Act, accounting records must be kept up to and including the seventh year after the end of the calendar year in which the financial year ended. Electronic invoices must be kept in the format and with the content they had when they arrived.
Is automated invoice processing safe?
It can be safer than manual handling if it has checks for duplicates, changed bank details and unusual amounts, and logging. Without such checks a fraudulent invoice can pass unnoticed. Keep people in the steps where errors become expensive.


