Automation

UiPath RPA Invoice Processing with OCR using FormX

By integrating FormX into the UiPath workflow, you can bring the advanced extraction models into your robot process.

Published on
January 7, 2022

Businesses can use Robotic Process Automation (RPA) software to automate operations and eliminate tedious tasks, and so to reduce costs. These tools can simulate human digital activities such as data entry, validation and processing. UiPath is a popular choice among the RPA solutions. When it comes to non-standard document formats like receipts and invoice, it will be difficult to automate the data extraction.

FormX is an AI-based intelligent data capture solution which can understand the context in the documents. By integrating FormX into the UiPath workflow, you can bring the advanced extraction models into your robot process. FormX enable the automations to understand and read data intelligently from complex document types.

In this article, we will show you how do you enhance PRA workflows with FormX OCR solution.

Benefits

  • Use our pre-built extraction models. No training is required
  • Reduce workload and cost of back office
  • Integrate with your existing workflows easily
  • Extract data from documents with or without a fixed format

Sample project

In this sample project, the bot will look into a folder of receipt images and extract the transaction dates and amounts into an Excel spreadsheet.

You can download the UiPath project via this link: https://go.formx.ai/uipath-receipt

To try the workflow,

  1. Sign up for an FormX account setup a receipt extractor.
  2. Obtain the Form ID and Access Token from the “API” tab
  3. Paste the Form ID and Access Token into the variables pane
  4. Click Run to start the bot
  5. Select the folders containing the folder and the output Excel file

Create a UiPath + FormX Workflow

1. Create an extractor on the FormX Portal

In the FormX portal, click the “Add New Form” and then “My Document don’t have a fixed format” to create an extractor. Select the “Receipt” model under document type. Pick the items you want to extract.

In this example, we will choose the “Total Amount” and “Date”.

Press “Save” to save the extractor.

2. Install the dependency

Click “Manage Packages” and install the “RestSharp” Package. This package will help us connect the workflow to the FormX API.

3. Set up API connection

First, add a “Try Catch” activity.

Inside the “Try Catch” activity, Create an “Invoke Code” activity

Select “VBNet” as the Language

Create “endpoint”, “form_id”, “access_token”, “inn” and “outt” in the argument list

Your code editor should look like the following

Dim client As RestClient = New RestClient(endpoint)
    client.Timeout = -1
    Dim request As RestRequest= New RestRequest(Method.POST)
    request.AddHeader("Content-Type", "image/jpeg")
	request.AddHeader("X-WORKER-TOKEN", access_token)
    request.AddHeader("X-WORKER-FORM-ID", form_id)
	request.AddParameter("image/jpeg", File.ReadAllBytes(inn), ParameterType.RequestBody)
    Dim response As IRestResponse = client.Execute(request)
    Console.WriteLine(response.Content)
	outt = response.Content

Create the “endpoint”, “form_id”, and “access_token” variables in the “Variables” panel in the main sequence scope

Copy the access token and Form ID from the portal and put into the variables

4. Read image files from computer

Use the “Browse for folder” and “Select file” actions to read the image files.

5. Save the extraction result

The JSON response from FormX will be stored in the variable “outt”. Handle the response by deserializing the JSON object and then pass the values into the next step in the sequence.

To save the resulting values into an Excel spreadsheet, the sequence will look something like this.

Conclusion

In this article, we show how your RPA bot can utilize the amazing extraction ability of FormX to process complex document types intelligently.

Besides receipts and invoices, businesses also use FormX to capture data from identity documents, licenses, certificates, address proof, and many other forms. FormX is also optimized for mobile-captured images. Using its state-of-the-art machine learning model, information can be accurately extracted from the images under different lighting condition, skew and blurriness.

You can download the UiPath sample project to get started: https://go.formx.ai/uipath-receipt

Contact us to schedule a demo today to bring automation to your work!

Extract data from these documents
Ready to get started?
Schedule a demo
Invoice
Receipts
Purchase Orders
Bank Statements
Contracts & Agreements
HR Forms & Applications
Shipping Orders & Delivery Notes
Loyalty Members Applications
Annual Reports
Business Certificates
Personnel Licenses
And much more!