For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.10 (unreleased)

Amazon Textract connector

Integrate Amazon Textract to automatically extract document text and data in your BPMN service.

About this connector

Use this connector to orchestrate Amazon Textract-powered extraction as part of business processes that rely on documents. Using machine learning allows you to read and process any type of document, reducing manual work and increasing accuracy in document-centric processes.

The Amazon Textract machine learning (ML) service can automatically extract text, handwriting, layout elements, and data from scanned documents.

Camunda marketplace

The Amazon Textract connector is available in the Camunda marketplace.

Prerequisites

The following prerequisites are required to use this connector:

PrerequisiteDescription
Amazon Web Services (AWS) IAM user and permissions
  • A valid AWS Identity and Access Management (IAM) user with permissions configured to allow access to Amazon Textract (and Amazon S3 if used), such as:

    • AmazonTextractFullAccess: Required

    • AmazonS3ReadOnlyAccess: Required if using Amazon S3 as the document source

    • AmazonS3FullAccess: Optional if using Amazon S3 as the output location for asynchronous execution

  • The access key pair (access key and secret access key) for this IAM user. This is required for connector authentication.

info

For Amazon Textract setup instructions, refer to the Amazon Textract Developer Guide.

Use this connector

New to using an outbound connector? Learn how to add and use this type of connector, apply element templates, use connector secrets, handle results and errors, and more.

Authentication

Select an authentication type from the Authentication dropdown.

Credentials

Use AWS authentication.

PropertyTypeRequiredDescriptionExample
Access KeyStringYesAWS access key for Textract.AKIAIOSFODNN37
Secret KeyStringYesAWS secret key for Textract.wJalrXUtnFEgfMIK7MDENGbPxRfiCY
note

Requires your AWS access key and secret access key (see prerequisites).

Default Credentials Chain (hybrid/Self-Managed only)

Use this authentication type if your system relies on implicit authentication (for example, IAM roles, environment variables, or credentials files). Uses the Default Credential Provider Chain to resolve credentials.

Configuration

Region

Configure the AWS region for this connector.

PropertyTypeRequiredDescriptionExample
RegionStringYesSpecify the AWS region where the Textract service and your S3 buckets are hosted.us-east-1

Operations

Analyze Document

Analyze documents using Textract. Different input parameters are available depending on the Execution type you select.

Input parameters

PropertyTypeRequiredDescriptionExample
Execution typeDropdownYes

Specify the inference endpoint type:

  • Real-time: For small files requiring immediate text extraction. Only single-page PDFs are supported when using S3. For multi-page PDFs, use Polling or Asynchronous.

  • Polling: Starts analysis and polls every five seconds until the result is available. Best for larger documents where blocking execution is acceptable.

  • Asynchronous: For large or complex documents processed in the background.

document
Document locationDropdownYesWhere the document to be analyzed is stored: Amazon S3 or Uploaded document. Amazon S3 is best for most use-cases.Amazon S3
Document bucketStringYes for Amazon S3Name of the S3 bucket containing the document. Ensure proper permissions for Textract access.automation-test
Document nameStringYes for Amazon S3Full path from the bucket root to the document.my-document.pdf
Document versionStringNoSpecify if you need to process a specific document version. If not set, the latest version is used.5
Output S3 BucketStringYes for AsynchronousThe S3 bucket where Textract writes the analysis result for asynchronous execution.automation-output

When Document location is Uploaded document, use the Document source dropdown to select where that document comes from. Select one of the following options, then complete the field it reveals:

Document sourceReveals fieldDescription
Camunda DocumentCamunda documentReference a document in the Camunda document store using a FEEL expression. Supports PNG and JPEG only, and only for real-time execution.
From URLURLFetch the document from an external URL.
note

Textract does not offer Inline Content as a document source, since it requires raw image/PDF bytes rather than the UTF-8 text bytes an inline document stores.

You must select at least one feature type. Combining multiple options can produce richer extraction results.

PropertyTypeRequiredDescriptionExample
Analyze formBooleanNoSelect this to return information about detected form data.
Analyze signaturesBooleanNoSelect this to return the locations of detected signatures.
Analyze layoutBooleanNoSelect this to return information about the layout of the document.
Analyze queriesBooleanNoSelect this to return an answer to a query.
QueryStringYes, if analyze queries is trueThe query to be applied to the document.What is the IBAN in the invoice?

Additional optional parameters for advanced configuration:

PropertyTypeRequiredDescriptionExample
Response formatDropdownNoHow the analysis result is returned: as JSON returns it directly in the process variables; Document reference uploads it to the Camunda document store and returns a reference. Not shown for Asynchronous execution, which always writes the result to the output S3 bucket.Defaults to as JSON
Client Request TokenStringNoThe idempotent token that you use to identify the start request.
Job TagStringNoAn identifier that you specify that's included in the completion notification published to the Amazon SNS topic.
KMS Key IDStringNoThe KMS key used to encrypt the inference results.
Notification Channel Role ARNStringNoThe Amazon SNS topic role ARN that you want Amazon Textract to publish the completion status of the operation to.
Notification Channel SNS Topic ARNStringNoThe Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.

Output

The connector response mirrors the AWS Textract API, depending on the execution type:

For Real-time and Polling execution, the Response format dropdown controls how that result reaches your process:

  • as JSON (default) returns the result above directly in the process variables, unchanged from earlier template versions.
  • Document reference uploads the result as a JSON file to the Camunda document store instead, and returns a reference:
{
"document": {
"storeId": "in-memory",
"documentId": "8b54b413-b847-4650-b445-de963d5c506d",
"contentHash": "ed0f7ad835669698a108a32b2a99e89e4f5aea84127fde68df4248b11197b0e5",
"metadata": {
"contentType": "application/json",
"size": 2048,
"fileName": "8b54b413-b847-4650-b445-de963d5c506d"
},
"camunda.document.type": "camunda"
}
}

To get the answer of the query when using the Analyze queries feature:

= {"answer": response.blocks[item.blockType = "QUERY_RESULT"][1].text}

For example, to get the response, when using asynchronous execution, use a timer event for example and retrieve the result with the S3 connector.

Example process using asynchronous execution

Troubleshooting

To learn about general error handling in Camunda, see BPMN errors and failing jobs.

Further Resources