The EXTRACT action is used by the Textract connector to execute Amazon Textract to extract text and metadata from JPEG and PNG files that are less than 5mb in size.
Use this action to process scanned documents, forms, invoices, applications, contracts, and other image-based content. Amazon Textract analyzes the submitted document and returns extracted text together with document structure information, including form fields and table data. The extracted information can be mapped to process variables and used by subsequent workflow activities.
The EXTRACT action supports JPEG and PNG images and can perform both text extraction and document analysis. Depending on the document being processed, Amazon Textract uses DetectDocumentText to extract text from the document, or AnalyzeDocument to identify and extract forms and tables. The returned information can then be mapped to process variables, used in forms, routed through gateways, or passed to downstream integrations.
The authentication for the Textract connector is set using the configuration parameters. For more details, see Textract Connector Configuration Parameters.
The input parameters of the action are:
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | Array<content>, Content | Required | The file to analyze. The value must be a variable of type Content containing the document or image to process. |
| outputFormat | String | Optional | The format of the extracted results. Supported values are JSON and TXT. The default value is JSON. |
| confidenceLevel | String | Optional | The minimum confidence score required for extracted results. Example: 0.75. |
| timeout | Integer | Optional | The maximum time, in milliseconds, that the connector waits for the Textract operation to complete. Example: 910000. |
The output parameters of the action are:
| Parameter | Type | Required | Description |
|---|---|---|---|
| awsResult | JSON | Optional | The complete response returned by Amazon Textract, including extracted text, document structure information, forms, tables, and analysis metadata. The structure of the returned result depends on the content of the document and the Amazon Textract operations performed. |