UiPath Activities

The UiPath Activities Guide

Document Processing using Intelligent OCR and Language Detection

The example below explains how to use the Intelligent OCR and FlexiCapture activities for processing documents, extracting specific information, and displaying it in a message box. It presents activities such as IntelligentOCR Scope, Process Document and Get Field. You can find these activities in the UiPath.IntelligentOCR.Activities package.

This is how the automation process can be built:

  1. Open Studio and create a new Process named by default Main.

Note:

Add all the files used by the robot in the project folder. You can use your own files or you can download the ones provided in the below example.

  1. Drag a Sequence container in the Workflow Designer and create the following variable:
Variable Name
Variable Type
Default Value

InvoicesFolder

String

-

  1. Drag a For Each activity inside the Sequence container.
    • Add the value InvoiceFilePath in the ForEach field.
    • In the Properties panel, select the option String from the TypeArgument drop-down list.
    • Add the expression Directory.GetFiles(InvoicesFolder) in the Values field. We have provided two Japanese invoices. The language detection is done automatically.
  2. Drag an IntelligentOCR Scope activity inside the Body container of the For Each activity.
    • Select the Do container of the activity and create the following variables:
Variable Name
Variable Type
Default Value

ProcessedInvoice

UiPath.IntelligentOCR.FC.FCDocument

-

ClientName

UiPath.IntelligentOCR.FC.FCField

-

TotalAmount

UiPath.IntelligentOCR.FC.FCField

-

  1. Place a Write Line activity inside the Do container.
    • Add the expression "Processing " + InvoiceFilePath in the Text field.
  2. Drag a Process Document activity under the Write Line activity.
    • In the Properties panel, add the expression {"JPInvoiceSampleDefinition.fcdot"} in the DefinitionFiles field.
    • Add the value InvoiceFilePath in the Document field.
    • Add the variable ProcessedInvoice in the Result field.
  3. Add a Get Field activity below the Process Document activity. This activity extracts the Client Name from the processed document.
    • In the Properties panel, add the variable ProcessedInvoice in the Document field.
    • Add the value "ClientName" in the Name field.
    • Add the variable ClientName in the Result field.
  4. Drag another Get Field activity and place it below the first one. This activity extracts the Total Amount from the processed document.
    • In the Properties panel, add the variable ProcessedInvoice in the Document field.
    • Add the value "TotalAmount" in the Name field.
    • Add the variable TotalAmount in the Result field.
  5. Drag a Write Line activity below the Get Field activity.
    • Add the expression "Client Name: " + ClientName.Value + " | Total Amount: " + TotalAmount.Value in the Text field.
  6. Run the process. The robot extracts the data, processes the document, extracts the specified fields, and displays the results.
     
     
    Download example

Updated about a month ago


Document Processing using Intelligent OCR and Language Detection


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.