⚙Tool
Amazon Textract Tools
Extract text, tables, and forms from documents stored in Amazon S3 with Amazon Textract
Amazon Textract uses machine learning to read text, tables, and forms from scanned documents (PDFs and images) stored in Amazon S3. Use these tools in a workflow when you need to OCR a document, pull structured data out of forms and tables, or feed extracted text into a downstream Agent block.
Overview
| Property | Value |
|---|---|
| Provider | textract |
| Category | tools |
| Auth | AWS SigV4 (Access Key ID + Secret Access Key) |
Operations
| Operation | Tool ID | Description |
|---|---|---|
| Detect document text | textract_detect_document_text | Detect lines and words of text in a document stored in S3 |
| Analyze document | textract_analyze_document | Analyze a document in S3 for tables, forms, and other features |
Configuration
textract_detect_document_text
| Parameter | Type | Required | Description |
|---|---|---|---|
awsRegion | string | Yes | AWS region (e.g. us-east-1). Visibility: user-only |
awsAccessKeyId | string | Yes | Secret. AWS access key ID. Visibility: user-only |
awsSecretAccessKey | string | Yes | Secret. AWS secret access key. Visibility: user-only |
s3Bucket | string | Yes | S3 bucket containing the document. Visibility: user-or-llm |
s3Name | string | Yes | S3 object key (name) of the document. Visibility: user-or-llm |
textract_analyze_document
| Parameter | Type | Required | Description |
|---|---|---|---|
awsRegion | string | Yes | AWS region (e.g. us-east-1). Visibility: user-only |
awsAccessKeyId | string | Yes | Secret. AWS access key ID. Visibility: user-only |
awsSecretAccessKey | string | Yes | Secret. AWS secret access key. Visibility: user-only |
s3Bucket | string | Yes | S3 bucket containing the document. Visibility: user-or-llm |
s3Name | string | Yes | S3 object key (name) of the document. Visibility: user-or-llm |
featureTypes | json | No | Feature types to analyze, e.g. ["TABLES","FORMS"]. Common values: TABLES, FORMS, QUERIES, SIGNATURES, LAYOUT. Defaults to ["TABLES","FORMS"] when omitted. Visibility: user-or-llm |
Outputs
textract_detect_document_text
data(json) — Textract DetectDocumentText result (the raw API response, containing theBlocksarray,DocumentMetadata, etc.)
textract_analyze_document
data(json) — Textract AnalyzeDocument result (the raw API response, containing theBlocksarray with table/form relationships,DocumentMetadata, etc.)
YAML Example
textract_1:
type: textract
name: "Amazon Textract"
inputs:
operation: "textract_detect_document_text"
s3Bucket: "my-bucket"
s3Name: "path/to/document.pdf"
awsRegion: "us-east-1"
awsAccessKeyId: "{{AWS_ACCESS_KEY_ID}}"
awsSecretAccessKey: "{{AWS_SECRET_ACCESS_KEY}}"
connections:
outgoing:
- target: next-block-idTips
- Auth is AWS SigV4, not an API key. Provide
awsRegion,awsAccessKeyId, andawsSecretAccessKey; the request is signed and sent tohttps://textract.{awsRegion}.amazonaws.com/. The IAM user/role needstextract:DetectDocumentText/textract:AnalyzeDocumentpluss3:GetObjecton the source bucket. - The document must already live in S3. Both operations read from
s3Bucket+s3Name(the object key) — there is no inline byte upload. Make sure the bucket is in the same region asawsRegion. - Choose the right operation. Use
textract_detect_document_textfor plain OCR (lines and words). Usetextract_analyze_documentwithfeatureTypesset to["TABLES","FORMS"](or addQUERIES/SIGNATURES/LAYOUT) when you need structured tables and key-value form data. - The
dataoutput is the raw Textract response. Parse theBlocksarray (e.g.{{textract_1.data}}) in a Function or Agent block to assemble lines, tables, or form fields downstream.