For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.11 (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. Not required if you use the default credentials chain (hybrid/Self-Managed only) or a saved AWS credential.

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 a saved AWS credential, or select an authentication type from the Authentication dropdown.

AWS credential​

Select a saved credential instead of entering authentication details on the task.

PropertyTypeRequiredDescriptionExample
AWS credentialConfigurationNoSelect a saved AWS credential, which can include a default region. When you select a credential, the Authentication, Access key, and Secret key fields are hidden. Learn more about credentials.

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. When you select an AWS credential, this field is optional: it overrides the credential's default region, and is required if the credential has no default region.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.

Defaults to Polling. When Document location is From Process or URL, only Real-time is available.

Polling
Document locationDropdownYesWhere the document to be analyzed is stored: From Amazon S3 (default) or From Process or URL. Amazon S3 is best for most use-cases.From 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
Output S3 prefixStringYes for AsynchronousThe prefix of the object key that the output is saved to.

When Document location is From Process or URL, 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 tablesBooleanNoSelect this to return information about the tables that are detected in the input document. Selected by default.
Analyze formBooleanNoSelect this to return information about detected form data. Selected by default.
Analyze signaturesBooleanNoSelect this to return the locations of detected signatures. Selected by default.
Analyze layoutBooleanNoSelect this to return information about the layout of the document. Not selected by default.
Analyze queriesBooleanNoSelect this to return an answer to a query. Selected by default.
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. Asynchronous execution only.
Job tagStringNoAn identifier that you specify that's included in the completion notification published to the Amazon SNS topic. Asynchronous execution only.
KMS key IDStringNoThe KMS key used to encrypt the inference results. Asynchronous execution only.
Notification channel role ARNStringNoThe Amazon SNS topic role ARN that you want Amazon Textract to publish the completion status of the operation to. Asynchronous execution only.
Notification channel SNS topic ARNStringNoThe Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to. Asynchronous execution only.

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​