# Amazon Textract

Amazon Textract is an AWS service that automatically extracts text, handwriting, and data from scanned documents. It goes beyond simple optical character recognition (OCR) to identify, understand, and extract data from forms and tables.

#### **How to Connect Amazon Textract to ZBrain Flow?** <a href="#how-to-connect-amazon-textract-to-zbrain-flow" id="how-to-connect-amazon-textract-to-zbrain-flow"></a>

**Step 1: Select Amazon Textract as Your Connection**

* Click on the '+' button in the Flow and search for Amazon Textract.
* Select Amazon Textract.
* From the sidebar, open the connection dropdown.
* Click on ‘Create Connection.’

**Step 2: Setting Up the Amazon Textract Connection**

To establish a connection between Amazon Textract and ZBrain Flow, enter the following details:

1. **Connection Name:** Provide a unique and recognizable name for the connection.
2. **Access Key ID:** Give your AWS authentication credential that identifies your AWS account. This is required to establish a secure connection to the Textract service.
3. **Secret Access Key:** Enter the secret access key, which is the private key paired with your Access Key ID that authenticates requests to Amazon Textract. This should be kept secure.
4. **Endpoint:** This is an optional field for specifying a custom endpoint. AWS maintains default endpoints for each service in each region (like `textract.us-east-1.amazonaws.com` for the US East region)
5. **Region:** Specify the AWS geographic region where your Textract service is hosted. Select the appropriate region from the dropdown to ensure optimal performance and compliance.

**Save the Connection:** Once you enter all details, click on the ‘Save’ button to complete the setup and establish the connection.

**Step 3: Input the Document**

* Upload the input document for text extraction. It supports multiple formats, including JPEG, PNG, PDF, and TIFF.

**Step 4: Enable Return Blocks (Optional)**

Toggle ‘Return Blocks’ to extract structured data. When enabled, Amazon Textract returns text as an array of Block objects, preserving document structure, including words, lines, tables, and key-value pairs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/flows/flow-components/amazon-textract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
