mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-31 17:58:04 -05:00
* feat(tools): added calcom * added more triggers, tested * updated regex in script for release to be more lenient * fix(tag-dropdown): performance improvements and scroll bug fixes - Add flatTagIndexMap for O(1) tag lookups (replaces O(n²) findIndex calls) - Memoize caret position calculation to avoid DOM manipulation on every render - Use refs for inputValue/cursorPosition to keep handleTagSelect callback stable - Change itemRefs from index-based to tag-based keys to prevent stale refs - Fix scroll jump in nested folders by removing scroll reset from registerFolder - Add onFolderEnter callback for scroll reset when entering folder via keyboard - Disable keyboard navigation wrap-around at boundaries - Simplify selection reset to single effect on flatTagList.length change Also: - Add safeCompare utility for timing-safe string comparison - Refactor webhook signature validation to use safeCompare Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * updated types * fix(calcom): simplify required field constraints for booking attendee The condition field already restricts these to calcom_create_booking, so simplified to required: true. Per Cal.com API docs, email is optional while name and timeZone are required. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * added tests * updated folder multi select, updated calcom and github tools and docs generator script * updated drag, updated outputs for tools, regen docs with nested docs script * updated setup instructions links, destructure trigger outputs, fix text subblock styling * updated docs gen script * updated docs script * updated docs script * updated script * remove destructuring of stripe webhook * expanded wand textarea, updated calcom tools --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
97 lines
5.5 KiB
Plaintext
97 lines
5.5 KiB
Plaintext
---
|
|
title: AWS Textract
|
|
description: Extract text, tables, and forms from documents
|
|
---
|
|
|
|
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
|
|
|
<BlockInfoCard
|
|
type="textract"
|
|
color="linear-gradient(135deg, #055F4E 0%, #56C0A7 100%)"
|
|
/>
|
|
|
|
{/* MANUAL-CONTENT-START:intro */}
|
|
[AWS Textract](https://aws.amazon.com/textract/) is a powerful AI service from Amazon Web Services designed to automatically extract printed text, handwriting, tables, forms, key-value pairs, and other structured data from scanned documents and images. Textract leverages advanced optical character recognition (OCR) and document analysis to transform documents into actionable data, enabling automation, analytics, compliance, and more.
|
|
|
|
With AWS Textract, you can:
|
|
|
|
- **Extract text from images and documents**: Recognize printed text and handwriting in formats such as PDF, JPEG, PNG, or TIFF
|
|
- **Detect and extract tables**: Automatically find tables and output their structured content
|
|
- **Parse forms and key-value pairs**: Pull structured data from forms, including fields and their corresponding values
|
|
- **Identify signatures and layout features**: Detect signatures, geometric layout, and relationships between document elements
|
|
- **Customize extraction with queries**: Extract specific fields and answers using query-based extraction (e.g., "What is the invoice number?")
|
|
|
|
In Sim, the AWS Textract integration empowers your agents to intelligently process documents as part of their workflows. This unlocks automation scenarios such as data entry from invoices, onboarding documents, contracts, receipts, and more. Your agents can extract relevant data, analyze structured forms, and generate summaries or reports directly from document uploads or URLs. By connecting Sim with AWS Textract, you can reduce manual effort, improve data accuracy, and streamline your business processes with robust document understanding.
|
|
{/* MANUAL-CONTENT-END */}
|
|
|
|
|
|
## Usage Instructions
|
|
|
|
Integrate AWS Textract into your workflow to extract text, tables, forms, and key-value pairs from documents. Single-page mode supports JPEG, PNG, and single-page PDF. Multi-page mode supports multi-page PDF and TIFF.
|
|
|
|
|
|
|
|
## Tools
|
|
|
|
### `textract_parser`
|
|
|
|
Parse documents using AWS Textract OCR and document analysis
|
|
|
|
#### Input
|
|
|
|
| Parameter | Type | Required | Description |
|
|
| --------- | ---- | -------- | ----------- |
|
|
| `accessKeyId` | string | Yes | AWS Access Key ID |
|
|
| `secretAccessKey` | string | Yes | AWS Secret Access Key |
|
|
| `region` | string | Yes | AWS region for Textract service \(e.g., us-east-1\) |
|
|
| `processingMode` | string | No | Document type: single-page or multi-page. Defaults to single-page. |
|
|
| `filePath` | string | No | URL to a document to be processed \(JPEG, PNG, or single-page PDF\). |
|
|
| `s3Uri` | string | No | S3 URI for multi-page processing \(s3://bucket/key\). |
|
|
| `fileUpload` | object | No | File upload data from file-upload component |
|
|
| `featureTypes` | array | No | Feature types to detect: TABLES, FORMS, QUERIES, SIGNATURES, LAYOUT. If not specified, only text detection is performed. |
|
|
| `items` | string | No | Feature type |
|
|
| `queries` | array | No | Custom queries to extract specific information. Only used when featureTypes includes QUERIES. |
|
|
| `items` | object | No | Query configuration |
|
|
| `properties` | string | No | The query text |
|
|
| `Text` | string | No | No description |
|
|
| `Alias` | string | No | No description |
|
|
|
|
#### Output
|
|
|
|
| Parameter | Type | Description |
|
|
| --------- | ---- | ----------- |
|
|
| `blocks` | array | Array of Block objects containing detected text, tables, forms, and other elements |
|
|
| ↳ `BlockType` | string | Type of block \(PAGE, LINE, WORD, TABLE, CELL, KEY_VALUE_SET, etc.\) |
|
|
| ↳ `Id` | string | Unique identifier for the block |
|
|
| ↳ `Text` | string | The text content \(for LINE and WORD blocks\) |
|
|
| ↳ `TextType` | string | Type of text \(PRINTED or HANDWRITING\) |
|
|
| ↳ `Confidence` | number | Confidence score \(0-100\) |
|
|
| ↳ `Page` | number | Page number |
|
|
| ↳ `Geometry` | object | Location and bounding box information |
|
|
| ↳ `BoundingBox` | object | Height as ratio of document height |
|
|
| ↳ `Height` | number | Height as ratio of document height |
|
|
| ↳ `Left` | number | Left position as ratio of document width |
|
|
| ↳ `Top` | number | Top position as ratio of document height |
|
|
| ↳ `Width` | number | Width as ratio of document width |
|
|
| ↳ `Polygon` | array | Polygon coordinates |
|
|
| ↳ `X` | number | X coordinate |
|
|
| ↳ `Y` | number | Y coordinate |
|
|
| ↳ `Relationships` | array | Relationships to other blocks |
|
|
| ↳ `Type` | string | Relationship type \(CHILD, VALUE, ANSWER, etc.\) |
|
|
| ↳ `Ids` | array | IDs of related blocks |
|
|
| ↳ `EntityTypes` | array | Entity types for KEY_VALUE_SET \(KEY or VALUE\) |
|
|
| ↳ `SelectionStatus` | string | For checkboxes: SELECTED or NOT_SELECTED |
|
|
| ↳ `RowIndex` | number | Row index for table cells |
|
|
| ↳ `ColumnIndex` | number | Column index for table cells |
|
|
| ↳ `RowSpan` | number | Row span for merged cells |
|
|
| ↳ `ColumnSpan` | number | Column span for merged cells |
|
|
| ↳ `Query` | object | Query information for QUERY blocks |
|
|
| ↳ `Text` | string | Query text |
|
|
| ↳ `Alias` | string | Query alias |
|
|
| ↳ `Pages` | array | Pages to search |
|
|
| `documentMetadata` | object | Metadata about the analyzed document |
|
|
| ↳ `pages` | number | Number of pages in the document |
|
|
| `modelVersion` | string | Version of the Textract model used for processing |
|
|
|
|
|