Skip to main content
The Azure OCR app wraps two Azure AI services behind a single Prisme.ai app: Azure Computer Vision for lightweight image OCR (Read, Caption, Tags, Objects, People) and Azure Document Intelligence for structured extraction of documents (layouts, invoices, receipts, ID documents, …).

Computer Vision

Fast OCR and visual analysis for images via a single synchronous call

Document Intelligence

Async, structured extraction for PDFs and complex layouts with prebuilt models

Prerequisites

  • An Azure subscription with access to Azure AI services
  • A Computer Vision (or Multi-Service Cognitive) resource and its endpoint + API key
  • A Document Intelligence resource and its endpoint + API key
You can configure only one of the two services — each automation only requires the config of the service it targets.

Installation

  1. Go to Apps in your workspace
  2. Search for Azure OCR and install it
  3. Open the app instance configuration and fill in the required fields

Configuration

Endpoints are stored as hostnames only — the app automatically strips https:// and trailing slashes, so both https://xxx.cognitiveservices.azure.com/ and xxx.cognitiveservices.azure.com work.

Available Instructions

analyzeImage (Computer Vision)

Send an image URL to Azure Computer Vision and return the analysis result (OCR and optional visual features). This call is synchronous. Uses the Image Analysis API version 2024-02-01.
Returns the raw Azure response body (readResult, captionResult, tagsResult, …).

analyzeDocument (Document Intelligence)

Send a document (URL or base64) to Azure Document Intelligence, poll for the result, and return either a simplified or raw extraction. This automation handles the async submit-and-poll cycle internally (2s interval, 60s timeout). Available prebuilt models: Uses the Document Intelligence API version 2024-11-30.

URL source

Base64 source

Raw output

Set outputFormat: raw to bypass the internal simplification and receive the full analyzeResult payload from Azure (pages, tables, key-value pairs, styles, …).

Error Handling

Both instructions emit an error event and return a structured error payload instead of raising. The payload shape is:

Listening for Errors

Because both instructions emit an error event on failure, you can globally monitor Azure OCR issues from another automation:

Example Use Cases

Extract structured invoice data from a PDF sent by email.

Best Practices

  • Hostname only — always strip https:// and the trailing slash from endpoints to avoid NetworkError.
  • Pick the right modelprebuilt-read is ~3× faster than prebuilt-layout; use layout only when tables or structure matter.
  • Prefer url over base64 for large documents — base64 uploads go through the Prisme.ai runtime and inflate the request size by ~33%.
  • Handle the 60s timeout — for long PDFs, either reduce pages or split the document upstream.
  • Use simple output for LLM pipelines (flattened text/markdown) and raw when you need Azure’s full structured result (bounding boxes, tables, key-value pairs).

External Resources

Azure Computer Vision

Image Analysis 4.0 reference

Azure Document Intelligence

Document Intelligence overview and prebuilt models

Prebuilt Models

Full list of prebuilt and custom models

API Keys & Endpoints

Create a Multi-Service Cognitive resource