Rossum and UiPath: Invoice extraction in 15 minutes (source code provided)

Acknowledgement: This plug & play open-source example was built by InnovationPath and is also available on UiPath Go.

Many organizations today are evaluating the opportunity to automate Accounts Payable processes with UiPath robots. But the key part to achieve the automation benefits is to deal with the human effort associated with data capture from invoices, so that the UiPath robot can then manage the workflow and postings. Obviously, we do not want the robot to be “front-ended” by a human for invoice data capture. We are in the 21st century!

An RPA<>AP automation project needs an invoice data capture process that keeps up with the robots: reliable, accurate, scalable, layout-independent, rapid to implement and easy to integrate. Traditional OCR-based systems just will not fit this bill.

Rossum’s cognitive platform is able to capture invoice information without any template setup, and UiPath robots bring the ease of integration to the extreme. In this example, we provide all the source codes that you will need to automate invoice processing in 15 minutes.

What you will learn

A typical accounts payable process consists of the following steps:

  1. Gathering invoices from multiple sources
  2. Extracting data from invoices (optional 2-way, 3-way or vendor-list matching)
  3. Posting invoice data into an ERP/DMS system
  4. Invoice approval workflow for non-PO invoices.
Rossum and UiPath - Invoice processing

In this article, we will address step 2. Why? Because that’s the most challenging subprocess from the whole list. Other steps can be automated pretty easily by using RPA like UiPath. However, the dynamic nature of invoice layouts requires a different, cognitive approach that is brought by Rossum.  We will show you how to simply capture the data from the invoices using a UiPath script that encapsulates the Rest API calls.

What you will need

Rossum app: you will need credentials to a default account. If you don’t have one yet, you can create an account here (free for <300 invoices per month).

UiPath studio: if you don’t have UiPath studio installed on your computer, you can use the community version for testing purposes. Download here.

Source codes: Download UiPath workflows for this demo here.

Basic Plug & Play example

In this demo, you can find two sample workflows that connect UiPath robot to the cognitive platform. The basic version of the data processing workflow is depicted below and contains 4 steps:

Rossum with UiPath process
  1. Send documents from a local folder to Rossum.
  2. Rossum processes the documents (it can take several minutes)
  3. Rossum online user interface is used for human verification (this step can be skipped by using Optional_AutomatedVerification workflow, more information here)
  4. Receive data from Rossum and store the results in .xlsx file

Step 1: Decompress the source code file

First, you need to decompress the provided .zip file. It has the following structure:

Decompress the source code file

Important files are:

  • a_Input files – Folder for PDFs that will be sent to Rossum cognitive platform (it contains an example file already)
  • b_Processing files – PDF files in this folder have already been imported to Rossum cognitive platform and are pending review
  • c_Processed files – PDF files in this folder have been successfully processed and reviewed in Rossum cognitive platform
  • d_Output data – results will be stored here
  • 01_Import, 02_Export, Optional_AutomatedVerification.xaml  – UiPath source files needed for importing documents, exporting the data and automating human verification
  • Credentials.json – json file where you need to fill your Rossum credentials before you start
  • License file – includes licensing details for this example

Step 2: Insert your Rossum credentials

Before you start using the workflows, you have to fill your username and password in the credentials.json file. This file is used by all UiPath activities to authenticate your account. When you open credentials.json in your favorite text editor, you’ll see the default content:

Rossum sign in credentials

Replace the username and password placeholders with credentials that you have used during your account creation (if you don’t have an account, create it here). Your file should look like the one below (with different credentials):

Rossum sign in credentials

Step 3: Send documents

If you have already set up your credentials file, you can start sending documents to Rossum. Workflow 01_Import is prebuilt for you and it automatically sends PDFs and images that are stored in a_Input files folder. This example includes an example file but feel free to test the app with your own invoices.

  1. Open the 01_Import file in UiPath (it may take a while to automatically download all dependencies)
  2. Run the workflow by pressing ([wp-svg-icons icon=”play-3″ wrap=”i”]) or F5 on your keyboard. Documents start to upload automatically
Rossum with UiPath - Run the workflow
  1. If everything goes well, you should see a dialog window that confirms successful upload
Rossum with UiPath - upload confirmation

Step 4: Human verification

Now, documents are being processed by Rossum Artificial Intelligence engine. You can see them in the user interface after you login at

Rossum sign in page

You’ll see a list of documents that need to be verified (please note that it may take a while until the AI engine processes the uploaded documents).

Rossum user interface - list of documents

Next, you can quickly and efficiently verify the extracted data by clicking the “Start processing” button.

Rossum user interface - human verification

When you verify all the extracted data you can download it by running the second UiPath workflow.

Step 5: Export data

In order to download the final verified data, open 02_Export workflow and run it by pressing ([wp-svg-icons icon=”play-3″ wrap=”i”]) or F5 on your keyboard. It simply downloads the extracted data and stores it in the excel file in “d_Output data” folder.

Please note: This example workflow downloads and stores only the following fields: Invoice ID, Order ID, Date Issue, Total Tax, Net amount, Vendor name, Vendor VAT number, Recipient name. If you want to download different fields you need to edit the fieldsToExtract variable in 02_Export workflow.

Rossum data export confirmation

Optional step: Automated human verification

In the previous steps, we’ve implemented a very basic flow with human verification. However, it is possible to implement custom logic that allows you to skip the manual check.

We provide UiPath workflow Optional_AutomatedVerification that can be inserted before human verification. It extracts data from Rossum and your custom logic verifies the extracted data instead of a human (ex. PO matching, Vendor matching, etc.).

Rossum with UiPath - automated human verification
Rossum with Upath - automated human verification

How does it work? In the image below, you can see a sample UiPath sequence – it accesses the data extracted by Rossum in the “Extract values” subsequence and it needs to decide whether the document can be verified automatically. You should customize this decision process by replacing subsequences in the red rectangle. If you decide that the document should skip human verification, you need to set the “ConfirmDoc” variable to True.

As you can see, this toy does not include any complex code and simply automates all the documents. However, we are sure you will build more complex logic 🙂 Good luck!

You can take a look through the slides and watch the recording from our Invoice Extraction with UiPath Webinar for further details.

Want to automate your invoice capture process? Start extracting your first invoice in 30 seconds in our free trial.

Rossum invoice extraction free trial


  • Avatar


    How to extract other entities from the documents?


    • Rossum


      Extracting other entities from the documents is easy as well! The AI can be trained for any kind of data fields similar to the pre-trained fields. It’s best to make an appointment with one of our automation experts to set things up.


Leave comment