- はじめに
- スタート アップ ガイド
- 任意のキャンバスで構築する
- 大文字と小文字で構築
- フローを利用した構築
- AI エージェントをオーケストレーションする
- 外部 API を呼び出す
- 受信メールの処理
- Slack 通知ワークフローを構築する
- ワークフローに人間による承認を追加する
- チャット エージェントのワークフローを構築する
- エラーを処理する
- Extract data from a document
- BPMN で構築する
- オペレーティング
- 監視
- 最適化中
- 参考情報
Extract data from a document
Run an IXP model to extract structured fields from a document and route by confidence for automatic or human review processing.
What you'll build: A workflow that takes a document, pulls structured fields from it with an Intelligent eXtraction Platform (IXP) model, and routes by confidence. High-confidence extractions process automatically; anything uncertain goes to a person for review. This is the foundation for any document-driven process: invoices, claims, forms, contracts.
必要なもの
- Flow へのアクセス権を持つ UiPath Automation Cloud アカウント。
- A deployed IXP model in a folder you can access. If you don't have one, build and deploy a model in IXP first. The Extract node has no options until a model is deployed.
- Both IXP and Document Understanding services enabled on your tenant (Admin → Tenant → Services).
使用されるノード
- Manual Trigger: starts the workflow and supplies the document during testing.
- Extract: runs the IXP model and returns the extracted fields.
- Script: reads specific fields out of the extraction result.
- Decision: branches on extraction confidence.
- Quick Form: routes low-confidence documents to a person.
- Terminate: ends a failure path cleanly.
手順
1. Create a flow and supply a document
- Maestro Orchestrate → フローを開き、[新しいフロー] を選択します。
- Add a Manual Trigger to the canvas.
- In the trigger's configuration panel, define an input that holds the document to process (for example,
invoiceFile). During testing you can attach a sample file to this input.
For production, replace the Manual Trigger with a trigger that delivers the document, for example an email or connector trigger that provides an attachment.
2. Add an Extract node
- Open the node palette and expand Document processing → Extract.
- Select your deployed model. If the category is empty, deploy a model in IXP and reopen the palette.
- Connect the Extract node to the trigger.
- In the properties panel, set Document to the file from the trigger, for example
$vars.start.output.invoiceFile.
3. Read the fields you need
-
Add a Script node after the Extract node.
-
Walk the result and pull the fields by name. Values live in a
Valuesarray, so readValues[0].Value. Compute the minimum confidence across only the fields the model actually returned, skipping missing fields and the-1.0sentinel:const fields = $vars.extract1.output?.ExtractionResult?.ResultsDocument?.Fields || []; const norm = (s) => String(s || "").toLowerCase().replace(/\s+/g, ""); const get = (name) => { const f = fields.find((x) => norm(x.FieldName) === norm(name)); return f && f.Values?.[0] ? f.Values[0].Value : undefined; }; const confidences = fields .filter((f) => !f.IsMissing && f.FieldType !== "Table") .map((f) => f.Values?.[0]?.Confidence) .filter((c) => typeof c === "number" && c >= 0); const minConfidence = confidences.length ? Math.min(...confidences) : 1; return { vendor: get("Vendor Name"), total: get("Total"), minConfidence, };const fields = $vars.extract1.output?.ExtractionResult?.ResultsDocument?.Fields || []; const norm = (s) => String(s || "").toLowerCase().replace(/\s+/g, ""); const get = (name) => { const f = fields.find((x) => norm(x.FieldName) === norm(name)); return f && f.Values?.[0] ? f.Values[0].Value : undefined; }; const confidences = fields .filter((f) => !f.IsMissing && f.FieldType !== "Table") .map((f) => f.Values?.[0]?.Confidence) .filter((c) => typeof c === "number" && c >= 0); const minConfidence = confidences.length ? Math.min(...confidences) : 1; return { vendor: get("Vendor Name"), total: get("Total"), minConfidence, };
4. Branch on confidence
- Add a Decision node after the Script node.
- Set the condition to check the lowest confidence, for example
$vars.script1.output.minConfidence >= 0.8. - On the True branch (high confidence): connect to the next step in your automation (a system write, a notification, or a downstream node).
- On the False branch (low confidence): connect to the Human node in step 5.
5. Send low-confidence documents for review
- Add a Human node on the False branch.
- Configure a quick form that shows the extracted values and lets the reviewer correct them. Refer to Add human approval to a workflow for the form details.
- Add a Decision node after the Human node to branch on the reviewer's
status, then rejoin the main path with the corrected values.
6. Test and debug
キャンバスの下部のツールバーで [ デバッグを実行 ] (▶) を選択します。実行トレースで、以下の手順を実行します。
- Select the Extract node to inspect the returned
ExtractionResult. - Confirm the Script node pulled the right values. If a field is
undefined, check the field name against the model's schema (matching is case- and space-insensitive in the snippet above). - Use Mock output on the Extract node to test both branches without calling the model: supply a sample
ExtractionResultwith high, then low, confidence values.
結果
Your workflow extracts structured fields from the document, routes high-confidence results through the automatic path, and sends low-confidence documents to a human reviewer. You can inspect the extraction result and confidence scores in the execution trace and mock the Extract node to test both branches without calling the model.
このワークフローを拡張する
- Process a batch: wrap the Extract node in a Loop to handle a list of documents.
- Write results onward: after the high-confidence branch, add an HTTP Request or a connector node to push the data into a downstream system.
- Hand off to an agent: pass the extracted fields to an Autonomous Agent for classification, summarization, or a drafted response.