Azure - AI Document Intelligence
Execute layout analysis, form understanding, and structured extraction on complex documents using Microsoft Azure AI Document Intelligence (formerly Azure Form Recognizer).
Analyzes a document with Azure AI Document Intelligence using your own resource and returns its text, tables and key-value pairs. Routes to empty when no text is found.
Authenticates with your own Azure resource via connection_id (api-key credential with endpoint metadata); execution costs are billed by Azure to your subscription.
Operations (prebuilt and custom models):
- prebuilt-layout (default): full page structure — paragraphs, tables, selection marks, reading order.
- prebuilt-document: generic key-value and entity extraction across arbitrary forms.
- prebuilt-invoice: typed schema for invoice fields (vendor, totals, line items, dates).
- prebuilt-receipt: typed schema for retail receipts (merchant, totals, taxes, items).
- prebuilt-tax.us.w2: typed schema for U.S. W-2 tax forms.
- prebuilt-id: typed schema for government-issued identification documents.
- prebuilt-healthInsuranceCard.us: typed schema for U.S. health insurance cards.
- prebuilt-read: page-level OCR with handwriting and multi-language support.
- custom-
: user-trained models for specific document templates.
How it works
- Resolves the node config. Reads
content_base64orfile_pathfrom the config first and then from the incoming item. - Requires
connection_idand one ofcontent_base64orfile_path. - Resolves the credential on the server: the secret must contain
apiKey(orapi_key) and the endpoint is read from the credential config (endpoint) or from the secret. - Runs a Python process that calls
begin_analyze_documentwithmodel(defaultprebuilt-layout) and the optionalpagesrange, and waits for the analysis to finish. - Builds
{ text, chars, empty, method, metadata, tables, key_value_pairs }. Tables become grids of cell text (rows) with the page of their first region. - Chooses
emptywhen the trimmed text is empty, otherwiseextracted.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-read-invoice",
"label": "Read invoice",
"operator_slug": "integrations.microsoft.azure.document-intelligence",
"operator_version": "1.0.0",
"config": {
"connection_id": "pi-credential-xxxx",
"model": "prebuilt-layout",
"pages": "1-3"
}
}{
"ok": true,
"data": {
"text": "INVOICE 2026-0418\nTotal: 129.99 USD",
"chars": 35,
"empty": false,
"method": "azure-document-intelligence:prebuilt-layout",
"metadata": {
"model_id": "prebuilt-layout",
"pages_analyzed": 1,
"tables_count": 1,
"key_value_pairs_count": 0
},
"tables": [
{
"page": 1,
"rows": [
[
"Item",
"Amount"
],
[
"Service",
"129.99"
]
]
}
],
"key_value_pairs": []
},
"port": "extracted"
}Configuration
-
connection_idstring Required -
Connection credential with endpoint + api-key for your Azure AI Document Intelligence resource.
-
modelstring Optional -
Azure AI Document Intelligence model identifier. Use a built-in prebuilt model or a custom trained model id (custom-<id>).
-
pagesstring Optional Accepts expressions -
Optional page range filter (e.g. "1-3"). Leave empty for all pages.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
connection_id - Use an
objectcredential whose secret holdsapiKeyandendpoint(or putendpointin the credential config). -
model - Passed through unchanged, so any model id your resource supports works, including custom models, not only the listed ones.
-
content_base64Read by the code, not declared - Undeclared in the config schema; normally comes from the incoming item.
file_pathworks the same way and wins only whencontent_base64is absent. -
execution - Only
timeout_msis read (default 300000). The retry settings are not applied.
Output ports
extracted default The analysis returned text.
{
"text": "INVOICE 2026-0418\nTotal: 129.99 USD",
"chars": 35,
"empty": false,
"method": "azure-document-intelligence:prebuilt-layout",
"metadata": {
"model_id": "prebuilt-layout",
"pages_analyzed": 1,
"tables_count": 1,
"key_value_pairs_count": 0
},
"tables": [
{
"page": 1,
"rows": [
[
"Item",
"Amount"
],
[
"Service",
"129.99"
]
]
}
],
"key_value_pairs": []
}empty The analysis succeeded but found no text (for example a blank or image-only page with a model that does not read it).
{
"text": "",
"chars": 0,
"empty": true,
"method": "azure-document-intelligence:prebuilt-layout",
"metadata": {
"model_id": "prebuilt-layout",
"pages_analyzed": 1,
"tables_count": 0,
"key_value_pairs_count": 0
},
"tables": [],
"key_value_pairs": []
}error Validation, credential resolution, the Python process or the Azure call failed. Python failures include its stderr.
{
"error": "Python timed out after 300000ms",
"stderr": ""
}In expressions
What a later node can read from this node's output with $("Azure - AI Document Intelligence").item.json.<path> (write your node's label instead of Azure - AI Document Intelligence). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through extracted, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Azure - AI Document Intelligence").item.json.text | ||
$("Azure - AI Document Intelligence").item.json.chars | ||
$("Azure - AI Document Intelligence").item.json.empty | ||
$("Azure - AI Document Intelligence").item.json.method | ||
$("Azure - AI Document Intelligence").item.json.metadata | ||
$("Azure - AI Document Intelligence").item.json.tables | ||
$("Azure - AI Document Intelligence").item.json.key_value_pairs | ||
$("Azure - AI Document Intelligence").item.json.metadata.model_id | — | |
$("Azure - AI Document Intelligence").item.json.metadata.pages_analyzed | — | |
$("Azure - AI Document Intelligence").item.json.metadata.tables_count | — | |
$("Azure - AI Document Intelligence").item.json.metadata.key_value_pairs_count | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
connection_id is required. | error | No credential configured. |
Either content_base64 or file_path is required. | error | The incoming item carries neither field. Also returned by Python when file_path does not exist on the orchestrator. |
connection must provide endpoint + apiKey | error | The credential secret is not an object with apiKey, or no endpoint is stored. A plain string api-key secret does not work. |
Python timed out after <ms>ms | error | The analysis took longer than execution.timeout_ms (default 300000). |
Failed to resolve connection <connection_id>: <detail> | error | The credential does not exist or the backend could not be reached. |
Input contract
-
content_base64string Optional -
file_pathstring Optional
Output contract
-
textstring Optional -
charsnumber Optional -
emptyboolean Optional -
methodstring Optional -
metadataobject Optional -
tablesarray Optional -
key_value_pairsarray Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "integrations.microsoft.azure.document-intelligence",
"name": "Azure - AI Document Intelligence",
"category": "integrations",
"group": [
{
"key": "microsoft",
"name": "Microsoft",
"icon_url": "/icons/integrations/microsoft/microsoft.svg"
},
{
"key": "foundry",
"name": "Microsoft Foundry",
"icon_url": "/icons/integrations/microsoft/foundry.webp"
}
],
"icon_url": "/icons/integrations/microsoft/microsoft.svg",
"version": "1.0.0",
"description": "Execute layout analysis, form understanding, and structured extraction on complex documents using Microsoft Azure AI Document Intelligence (formerly Azure Form Recognizer).\n\n Authenticates with your own Azure resource via `connection_id` (api-key credential with `endpoint` metadata); execution costs are billed by Azure to your subscription.\n\n **Operations (prebuilt and custom models):**\n - **prebuilt-layout** (default): full page structure — paragraphs, tables, selection marks, reading order.\n - **prebuilt-document:** generic key-value and entity extraction across arbitrary forms.\n - **prebuilt-invoice:** typed schema for invoice fields (vendor, totals, line items, dates).\n - **prebuilt-receipt:** typed schema for retail receipts (merchant, totals, taxes, items).\n - **prebuilt-tax.us.w2:** typed schema for U.S. W-2 tax forms.\n - **prebuilt-id:** typed schema for government-issued identification documents.\n - **prebuilt-healthInsuranceCard.us:** typed schema for U.S. health insurance cards.\n - **prebuilt-read:** page-level OCR with handwriting and multi-language support.\n - **custom-<id>:** user-trained models for specific document templates.",
"capabilities": [
"document-intelligence",
"ocr",
"forms",
"tables",
"layout",
"azure",
"cloud"
],
"config_schema": {
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "Azure AI Document Intelligence Credential",
"description": "Connection credential with endpoint + api-key for your Azure AI Document Intelligence resource.",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"api-key",
"object"
],
"providers": [
"azure"
]
}
},
"model": {
"type": "string",
"title": "Model",
"enum": [
"prebuilt-layout",
"prebuilt-invoice",
"prebuilt-receipt",
"prebuilt-tax.us.w2",
"prebuilt-idDocument",
"prebuilt-healthInsuranceCard.us",
"prebuilt-read"
],
"default": "prebuilt-layout",
"description": "Azure AI Document Intelligence model identifier. Use a built-in prebuilt model or a custom trained model id (custom-<id>)."
},
"pages": {
"type": "string",
"title": "Pages",
"description": "Optional page range filter (e.g. \"1-3\"). Leave empty for all pages.",
"format": "expression"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
},
"required": [
"connection_id"
]
},
"input_contract_schema": {
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"file_path": {
"type": "string"
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
},
"tables": {
"type": "array"
},
"key_value_pairs": {
"type": "array"
}
}
},
"ports": [
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"required_resources": [],
"compatible_worker_pools": [
"standard-io",
"cloud-io"
],
"tags": [
"azure",
"document-intelligence",
"ocr",
"forms",
"layout"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://sommatic.ai",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"connection_id": {
"type": "string",
"title": "Azure AI Document Intelligence Credential",
"description": "Connection credential with endpoint + api-key for your Azure AI Document Intelligence resource.",
"ui_widget": "connection_picker",
"ui_options": {
"credential_types": [
"api-key",
"object"
],
"providers": [
"azure"
]
}
},
"model": {
"type": "string",
"title": "Model",
"enum": [
"prebuilt-layout",
"prebuilt-invoice",
"prebuilt-receipt",
"prebuilt-tax.us.w2",
"prebuilt-idDocument",
"prebuilt-healthInsuranceCard.us",
"prebuilt-read"
],
"default": "prebuilt-layout",
"description": "Azure AI Document Intelligence model identifier. Use a built-in prebuilt model or a custom trained model id (custom-<id>)."
},
"pages": {
"type": "string",
"title": "Pages",
"description": "Optional page range filter (e.g. \"1-3\"). Leave empty for all pages.",
"format": "expression"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
},
"required": [
"connection_id"
]
}{
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"file_path": {
"type": "string"
}
}
}{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
},
"tables": {
"type": "array"
},
"key_value_pairs": {
"type": "array"
}
}
}[
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Credentials
- Resolved on the server from
connection_id; the secret never reaches the workflow. - Capabilities
document-intelligenceocrformstableslayoutazurecloud- Tags
azuredocument-intelligenceocrformslayout
Notes and limits
- The first run on a host installs the Python dependencies in a cached virtual environment, which can take minutes.
file_pathmust exist on the orchestrator's filesystem, for example a file written byconnectors.microsoft.outlook.attachmentsinfilemode.- Azure usage is billed to your own resource. The worker does not retry.
Reviewed against the orchestrator code · 31e874b · 2026-11-26