UiPath Activities

The UiPath Activities Guide

FlexiCapture Integration

The example below explains how to create an automatic data extraction that classifies the documents, extracts specific fields, and validates them. The output is visible in a newly created .xlsx file. It presents activities such as Classify Document, Process Document, Validate Document, Get Field, Export Document, or Get Table. You can find these activities in the UiPath.IntelligentOCR.Activities package.

Note:

This workflow is using an older version of 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:

Make sure to add all the needed files (.json files and all the images) inside the project folder.

  1. Drag a Sequence container in the Workflow Designer.
  2. Drag an IntelligentOCR Scope activity inside the Sequence container.
  3. Select the Do container inside the IntelligentOCR Scope activity and create the following variables:
Variable Name
Variable Type
Default Value

classification

String

-

processedDoc

UiPath.IntelligentOCR.FC.FCDocument

-

validatedDoc

UiPath.IntelligentOCR.FC.FCDocument

-

field

UiPath.IntelligentOCR.FC.FCField

-

ValidationData

UiPath.IntelligentOCR.FC.ValidationStationAdapters.ValidationStationData

-

HumanValidated

UiPath.DocumentProcessing.Contracts.Results.ExtractionResult

-

FolderValues

System.String[]

-

TableValues

UIPath.DocumentProcessing.Contracts.Results.TableFieldValue[][]

-

  1. Drag an Assign activity inside the Do container.
    • Add the variable FolderValues in the To field.
    • Add the expression Directory.GetFiles("Input") in the Value folder.
  2. Add a For Each activity below the Assign activity.
    • In the Properties panel, select the option String from the TypeArgument drop-down list.
    • Add the variable FolderValues in the Values field.
  3. Select the Body container placed inside the For Each activity and create the following variables:
Variable Name
Variable Type
Default Value

ClassificationResult

String

-

InvoiceNumberField

UiPath.IntelligentOCR.FC.FCField

-

InvoiceTableField

System.Data.DataTable

-

InvoiceTableText

String

-

  1. Drag a Classify Document activity in the Body of the For Each activity.
    • Add the expression {Directory.GetCurrentDirectory + "\Invoice.fcdot", Directory.GetCurrentDirectory + "\Letters.fcdot" } in the DefinitionFiles field.
    • Add the expression item.ToString in the SourceDocument field.
    • Add the variable ClassificationResult in the Result field.
  2. Drag a Message Box activity below the Classify Document activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the expression "Document type is: " + ClassificationResult in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  3. Drag a Process Document activity below the Message Box activity.
    • In the Properties panel, add the expression {Directory.GetCurrentDirectory + "\Invoice.fcdot", Directory.GetCurrentDirectory + "\Letters.fcdot" } in the DefinitionFiles field.
    • Add the expression item.ToString in the Document field.
    • Add the variable processedDoc in the Result field.
  4. Drag a Message Box activity below the Process Document activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the expression "Document was processed with confidence score: " + processedDoc.Confidence.ToString in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  5. Drag a Validate Document activity under the Message Box activity.
    • In the Properties panel, add the variable processedDoc in the Document field.
    • Add the variable validatedDoc in the Result field.
  6. Drag a Get Field activity under the Validate Document activity.
    • In the Properties panel, add the variable validatedDoc in the Document field.
    • Add the variable "InvoiceNumber" in the Name field.
    • Add the variable InvoiceNumberField in the Result field.
  7. Drag a Message Box activity below the Get Field activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the expression InvoiceNumberField.Value in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  8. Drag a Get Table activity below the Message Box activity.
    • In the Properties panel, add the variable validatedDoc in the Document field.
    • Add the variable "InvoiceTable" in the Name field.
    • Add the variable InvoiceTableField in the Result field.
  9. Drag an Output Data Table activity under the Get Table activity.
    • In the Properties panel, add the variable InvoiceTableField in the DataTable field.
    • Add the variable InvoiceTableText in the Text field.
  10. Drag a Message Box activity below the Output Data Table activity.
    • In the Properties panel, select the option Ok from the Buttons drop-down list.
    • Add the variable InvoiceTableText in the Text field.
    • Select the check-box for the TopMost option. Doing so, the message box is always displayed to the foreground.
  11. Drag an Export Document activity below the Message Box activity.
    • In the Properties panel, add the variable validatedDoc in the Document field.
    • Select the XLS option from the Format drop-down list.
    • Add the expression "export.xls" in the Name field.
    • Add the expression Directory.GetCurrentDirectory + "\Output" in the Path field.
  12. Run the process. The robot automatically extracts the data and creates a new file with the validated results.
     
     
    Download example

Updated about a month ago


FlexiCapture Integration


Suggested Edits are limited on API Reference Pages

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