Skip to main content
Version: v11.5.0

Entity Extraction Prefab

Automatically extract data from structured documents such as Invoices, Receipts.

There are many situations where specific data needs to be extracted from a scanned receipt or say, a screenshot taken from a mobile phone. To be able to automatically extract chosen information from such documents can help build delightful user experiences. This prefab helps implement this extraction of data from any structured document. With the document as the input, the prefab uploads it to AWS Textract to extract data from it. This extracted data is available as key-value pair and developers can pick the data they are interested in.

How to use this prefab

  1. Download the prefab and import into your WaveMaker project.

    1. Click to download the Prefab ZIP.
  2. Create AWS account and IAM user with policy AmazonTextractFullAccess.

    1. Document: Getting started with AWS Textract.
  3. Generate and set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and the AWS_REGION at prefab’s App Environment. (In your app’s Settings > Config profile > EntityEXtraction (prefab) > App Environment)

  4. Bind the “URL” and “Entities” (properties of prefab) on your page.

    1. URL is the path of the document(Prefab v1.2 supports `.png` and `.jpg` formats) to download and process. You can bind URL property with [FileUpload](/learn/app-development/widgets/form-widgets/file-upload) widget's java service variable as shown in the below screen.

    2. Entities are labels from the document whose values have to be extracted. For example, in a [W2 form]( `Employee’s social security number` could be an entity.


  5. That’s it. Now you can bind prefab’s output(JSON object - key-value pair) back to different widgets (text, list, table, or form). The below example shows how to bind each individual entity-value to a Text widget.

  6. Finally, you can upload the document and then click on the prefab extract_info, It can fill values automatically in Text widgets as below.

Known Issue

  1. Prefab v1.2 won't support PDF document.

Other Prefabs

  1. Use Box Viewer to view Office documents in browser