Every supplier lays out an invoice differently. The Extract invoice data step reads any of them and gives you the same set of fields every time, so one process can handle all your suppliers.
It reads PDFs, Excel and Word files, and images (.jpeg, .jpg, .gif, .png).
1. Setting it up
{{popup:rpas/add:action=extract-invoice}}
| Field | What it does |
|---|---|
| File path (required) | Where the invoice is. Inside a loop over files this is usually a variable such as {file::path}. See Working with loops in RPAs. |
| Variable (required) | The name to store the invoice under. If you type invoice, the date is {invoice::general::date}. |
| Cache (required) | Keeps the result so the same invoice is not read twice, in later steps or other processes. Only if valid (the default) reuses a result only when it passed its checks. You can also choose Always or Never. |
| Receiving company | Your company name, or several separated by commas. It tells the bot which company on the invoice is you, so it can tell to from from. |
| Minimum / Maximum PO number | The range your purchase order numbers fall in, for example PO400000001 to PO400999999. It helps the bot find the right number on the invoice. |
| Currency | Pick one if all your invoices use the same currency. Leave blank for several. |
| Language | Pick one if all your invoices are in the same language. Leave blank for several. |
| Use supplier history | Shown only when your company has the supplier ledger switched on (see below). |
| Additional fields | Extra fields to read, each with a type (Date, Number, List, Text or Time). Type general::terms and you get {invoice::general::terms}. |
The step also accepts the supplier names you expect (from), comma separated, to check who sent the invoice. This is not in the step window yet.
2. What you get back
If your variable is invoice, read a field with {invoice::total::after tax} or {invoice::banking details::account number}.
{
"tax invoice": boolean,
"general": {
"number": "..",
"reference": "..",
"date": "yyyy-mm-dd",
"po number": ".."
},
"companies": ["..", ".."],
"total companies": #,
"from": "..",
"to": "..",
"line items": [{
"code": "..",
"description": "..",
"quantity": #,
"before tax": #,
"discount": #,
"tax": #,
"after tax": #,
"tax percentage": #,
"valid": boolean,
"taxable": boolean
}],
"total line items": #,
"total taxable line items": #,
"total non taxable line items": #,
"total": {
"before tax": #,
"discount": #,
"surcharge": #,
"tax": #,
"tax percentage": #,
"after tax": #,
"valid": boolean
},
"banking details": {
"account name": "..",
"bank name": "..",
"account number": "..",
"branch code": ".."
},
"currency": { "code": "..", "name": "..", "symbol": "..", "tax": # },
"file": { "name": "..", "path": "..", "extension": "..", "size": #, ... },
"valid": boolean,
"errors": []
}
valid is true when the invoice passed its checks, such as the line items adding up to the total. When it is false, errors says why.
3. Looping over invoices and line items
To read many invoices, loop over each file in a folder or each unread email, and use the loop's path as the File path.
To work through the lines of one invoice, loop over each record in a list. Set the list to invoice::line items and the counter variable to, say, line. Inside the loop, use {line::description} or {line::after tax}. You can filter the rows, for example only lines where tax is more than 0. See Working with loops in RPAs.
4. Supplier history
If your plan includes it, an administrator can switch on the supplier ledger in Settings › Supplier ledger. It is off by default. Then the step shows Use supplier history. When it is on, each invoice is recorded against its supplier and checked against their earlier documents: a changed bank account, a changed VAT number, a duplicate invoice or a price increase. An unclear date such as 03/04/2026 is read the way that supplier usually writes dates.
The check never fails the step. The answer is in {supplierCheck}, so your process decides what to do, for example send the invoice for approval.
5. Privacy
The bot opens the invoice on your machine. To read it, the step may send the invoice's text to AI; personal details such as bank and phone numbers are hidden from AI by default, and nothing is used to train models (AI and your data).
Invoice values are kept on the platform only when you switch something on: the supplier ledger, or Help fix document reading, which sends us a copy of an invoice the bot could not read. Both are off by default. See What a bot sends to Automize.