> ## Documentation Index
> Fetch the complete documentation index at: https://magicads.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Textract

> Setup AI Textract to automatically retrieve text, handwriting, and data from scanned documents

<Warning>This is a **Paid** extension that you need to first purchase via **Marketplace**</Warning>

## Introduction

AI Textract automatically retrieves text, handwriting, and data from scanned documents, surpassing basic optical character recognition (OCR) by interpreting and extracting information from forms and tables. Unlike many organizations that rely on labor-intensive manual extraction from PDFs, images (PNG | JPEG), tables, and forms — or use basic OCR tools requiring frequent manual adjustments—AI Textract employs machine learning to process any document type efficiently, delivering precise results without human intervention in mere minutes rather than hours or days. Additionally, its Receipt Analyze feature can detect vendor names embedded in logos without explicit labels and extract items, quantities, and prices even from unstructured line items lacking column headers.

## Extension Configuration

To be able to use AI Textract feature, follow these steps to setup AI Textract Extension.

<Steps>
  <Step title="Step 1">
    Go to the **Marketplace** in **Admin Panel** and install **AI Textract** extension after successfully purchasing it first.

    <img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-1.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=b5df14c9b7f6ca73557ef4e84aaf4bcb" width="402" height="278" data-path="images/extensions/textract/textract-1.png" />
  </Step>

  <Step title="Step 2">
    After installation is completed, go to **AI Settings** page in Admin Panel and click on **Extensions** tab there. Click on **AI Textract** there.

    <img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-2.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=0653e662e949e58071366a44ae006b0b" width="545" height="105" data-path="images/extensions/textract/textract-2.png" />
  </Step>

  <Step title="Step 3">
    You will need to include following required AWS credentials:

    * **AWS Access Key**
    * **AWS Secret Access Key**
    * **AWS S3 Bucket Name**
    * **AWS Region**

    <br />

    To create IAM user with **Access Key** and **Secret Access Key** refer to the **AWS IAM User Creation** intructions below.

    <br />

    To create Amazon S3 bucket, [refer to this page](/integrations/storage/s3)

    <img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-3.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=d21889eafb668ec1e144b0664c8fbe3e" width="729" height="206" data-path="images/extensions/textract/textract-3.png" />
  </Step>

  <Step title="Step 4">
    Next, turn on the checkboxes for **AI Textract Feature** and **AI Textract Free Tier Access**
    <Note>If you don't turn on AI Textract Free Tier Access, then users who did not subscribe to any subscription plan where you have AI Textract feature enabled, will not have any access to this feature</Note>
    You have also full control on the maximum file sizes that are allowed, which are **PNG | JPEG | PDF** and also control how much media credits are needed to process each task.

    <img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-4.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=c50cf5200f7e218de14abbf18f53a133" width="735" height="716" data-path="images/extensions/textract/textract-4.png" />
  </Step>

  <Step title="Step 5">
    After you are done with the configuration, click on the **Save** button.
  </Step>

  <Step title="Step 6">
    <Check>Congratulations! You have successfully completed the AI Textract extension configuration. Proceed to the section below on how to use it.</Check>
  </Step>
</Steps>

## AWS IAM User Creation

By default all access to IAM users are denied, except for the root user. Make sure to keep your root user credentials in a secure place, you don't need them for Davinci AI.

<Steps>
  <Step title="Step 1">
    Sign in to the [AWS Management Console](https://console.aws.amazon.com/console/) and open the [IAM](https://console.aws.amazon.com/iam/) console.
    <Tip>Or simply search for IAM service once you are logged in</Tip>
  </Step>

  <Step title="Step 2">
    Once you are at the IAM service page, in the left navigation pane, choose **Access management** -> **Users** and then click on **Create User** button.

    1. Provide **User name** as needed, and click on **Next** button

    <img src="https://mintcdn.com/magicads/sOSxKmkB3A1LT8Q_/images/ai/aws/polly/iam-1.png?fit=max&auto=format&n=sOSxKmkB3A1LT8Q_&q=85&s=cbf152edea92473ed50df5f36ce44e3f" width="1680" height="463" data-path="images/ai/aws/polly/iam-1.png" />

    2. On the **Set permissions** page, specify how you want to assign permissions to this set of new users. Choose **Attach policies directly option**. It will show you all the availalbe policies.
       <br /> Select and add following 2 policies:

    * **AmazonS3FullAccess**
    * **AmazonTextractFullAccess**
      <br />Click on **Next** button afterwards

    3. On the **Review and create** step, you should see following policies being added.
       Click on **Create User** button.

    <img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-5.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=54ba15dc83048806e432e0caa5178ffa" width="1649" height="678" data-path="images/extensions/textract/textract-5.png" />
  </Step>

  <Step title="Step 3">
    Once you have created a new IAM user, he will be available at the **Users** list. Click on your newly created user. You will be shown full details of that newly created user. Next:

    1. Select the **Security credentials** tab
    2. And click on **Create access key** button

    <img src="https://mintcdn.com/magicads/sOSxKmkB3A1LT8Q_/images/ai/aws/polly/iam-3.png?fit=max&auto=format&n=sOSxKmkB3A1LT8Q_&q=85&s=fa90be138d75f94aee4e5ea6da6628b6" width="1650" height="185" data-path="images/ai/aws/polly/iam-3.png" />

    3. Select **Third-party service** from the list and click on **Next** button.

    <img src="https://mintcdn.com/magicads/sOSxKmkB3A1LT8Q_/images/ai/aws/polly/iam-4.png?fit=max&auto=format&n=sOSxKmkB3A1LT8Q_&q=85&s=a6949a3211ff4879e934e2de52cbfd6e" width="1379" height="854" data-path="images/ai/aws/polly/iam-4.png" />

    4. Copy your **Access Key** and **Secret Access key** and store them in a secure place.
  </Step>

  <Step title="Step 4">
    Next, go back to **Step 3** of **Extension Configuration** section above and continue.
  </Step>

  <Step title="Step 5">
    You have completed the AWS IAM creation process.
  </Step>
</Steps>

## How to Use

Using AI Textract is an easy task. You can extract text and data from **PNG | JPEG | PDF** files. Simply select and upload your target file and click
<Warning>For processing `PDF` files, you need to setup your `CRON` job correctly, refer to the CRON Job tab in the docs for further details.</Warning>

Get started:

1. After successful installation and configuration of AI Textract extension, go to the User Panel and click on AI Textract tab.
2. Next, select and upload your target document

<img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-6.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=ac7855929835ce287897e0ce62329b12" width="445" height="729" data-path="images/extensions/textract/textract-6.png" />

2. You can set optional features as well, such as:

* **Workbook Name**
* **File Language**
* **Form Detection** in case if you will have forms in your file
* **Table Detection** in case if you will have any tables in your file
* **Receipt Processing** in case if the file you want to upload is a scan copy of a teceipt

3. Next, click on **Textract** button, it will start the anylyzing process
4. Once processing is completed, results will be available under **Textract Tasks** section.

<img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-7.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=1c5eeae52f367ea04ee965ffd7f83722" width="900" height="474" data-path="images/extensions/textract/textract-7.png" />

5. You can click on the **View** icon as well, and you will be shown the result.

<img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-8.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=b536edefd06de97d07489cb59a8c138e" width="1273" height="940" data-path="images/extensions/textract/textract-8.png" />

6. You can also download the results in CSV format and in row JSON formats.

<img src="https://mintcdn.com/magicads/yrCresVat1CLM6R8/images/extensions/textract/textract-9.png?fit=max&auto=format&n=yrCresVat1CLM6R8&q=85&s=8a57d42eacabadb39087e4b8caed5af9" width="662" height="285" data-path="images/extensions/textract/textract-9.png" />

<Check>Congratulations! You have successfully processed your first document with AI Textract.</Check>
