Process Automation (RPA)

Automated invoice processing from email

Processing supplier invoices often follows the same sequence: find the right email, download the attachment, read the details, enter them into the accounting system and archive the document. At higher volumes, manual copying increases alongside the risk of overlooking a document. Automation can handle repeated steps and pass uncertain cases to a person.

First decide where the process should end. Should it prepare a draft document, deliver an approved import or write into the accounts? A received attachment, a recognised invoice and a posted document are different states. Automatic processing also does not grant permission to make an automatic payment.

Look for data before building a robot

If the supplier or source system provides an agreed structured format, use it before reading a PDF. Values then need not be inferred from page layout. They still require checks of meaning, completeness and association with the correct document.

A text-based PDF can be processed differently from a scanned image. A scan needs OCR, which recognises text in images. An invoice model can also help assign that text to fields such as supplier, document number and line items. Microsoft Document Intelligence documentation describes this extraction from PDFs and images. Recognition alone does not confirm the correctness of an accounting entry.

For writing to the target system, we prefer a supported API or import if it covers the required procedure. A robot operating screens is useful where direct integration is unavailable. Changes to forms or sign-in must then be included in the maintenance plan.

Receiving email attachments safely

The process should read an agreed mailbox or folder with the necessary permissions. Record the identifier, attachment and receipt outcome for each message. A sender’s display name alone does not confirm the supplier or the authenticity of an invoice.

Define supported attachment types, sizes and the handling of damaged, password-protected or unknown files. Do not store them in a publicly accessible folder or execute them as programs or macros. OWASP recommends checking file types and sizes, restricting access and using antivirus checks or isolated processing as appropriate to the environment. The filename and declared type are insufficient as the sole check.

If a language model reads the document, treat its content as data. Text in an email or PDF must not change the process rules, data recipient or tool permissions. OWASP also describes instructions embedded in documents and messages. Restrict permitted actions outside the model and make writing to the accounts conditional on a separate check.

Which values to extract and verify

Agree the field list with the person responsible for accounting. It may include supplier identification, document number and type, issue and due dates, currency, line items, net amount, tax and total. This is a suggested process input list, not a universal list of legal requirements.

Each field needs its own check:

Recognition confidence is not the same as correctness. Microsoft recommends considering individual fields and human review when using it. A high score for one value does not confirm the whole document. Set thresholds from verified samples and risk, and do not fill missing values without evidence.

Duplicates and retries after a failure

The same invoice may arrive again under a different name or as a new scan. Checking a filename or file hash is therefore insufficient. Define a business key, such as supplier identification, document type and number, with any further context required by the accounting system. On a collision, the process should offer review rather than arbitrarily delete one item.

Use a stable processing identifier for imports and retain the document identifier returned by the target system. If a write times out, the document may already have been saved. Check its state through a supported interface or import records before trying again. Do not repeatedly click save simply because no response returned.

Model example: invoice INV-2048 from a known supplier arrives first as a PDF and later as a scan. The file contents differ, but the agreed business key matches the same document. The second input is marked as a possible duplicate and compared with the existing record. If amounts differ, the responsible person decides.

Exceptions need a usable review process

Send unknown formats, unreadable fields, missing values, mismatched totals and uncertain duplicates for manual review. The reviewer should see the original document, proposed values and the specific reason for stopping. Record corrections and approval so they can be traced later.

Do not automatically accept a new or changed bank account in a PDF as a verified payment detail. Check it through a separate approved procedure against supplier records. Separate document approval rules from payment rules.

States might include received, extracted, awaiting review, approved, imported and failed. Each must have a clear meaning and next action. Prefer identifiers and reasons in logs over copying entire sensitive documents. Set access and retention according to the purpose and the organisation’s rules.

Checking whether automation is worthwhile

Build a pilot from your own representative documents. Include text-based PDFs, scans, multi-page documents, credit notes, duplicate deliveries, incorrect amounts and target-system failures. For attachments containing several invoices, also verify that documents are separated correctly.

Prepare expected values and process outcomes for every case. Check that the correct document was saved exactly once and the invalid one reached the review queue. The number of attachments read or a successful robot status does not substitute for this outcome.

Measure time including corrections, manual review and operation. Track which fields need intervention and which formats fail. Savings across the entire procedure matter, beyond downloading attachments faster. At low volumes, a simple approved import may be more suitable than extensive robotic automation.

We design solutions with bounded retries of safe steps, processing records and exception notifications. Depending on requirements, we can use open-source or self-hosted tools. Licensing, operation and maintenance are assessed for the particular solution.

Next step

Establish the invoice count, total processing time and proportion of documents needing a person’s decision. Then choose one supplier group and one output for the pilot. Compare the result with the manual procedure before enabling automatic writes. For a joint assessment of the process, use a no-obligation consultation.

Related topics

You might also be interested in

If you do it the same way every week, a robot can do it

A software robot can take over repetitive administration – data transcription, invoice processing and regular reports.