Blab Document Classify
Overview
This node classifies documents into predefined categories using the Upstage Document Classification API. It supports input as either binary data from a previous node or an image URL. Users can define classification categories either through a form input or by providing a raw JSON schema. The node sends the document data to the API and returns either the classification result or the full API response. This node is useful for automating document categorization tasks such as sorting invoices, receipts, contracts, or other document types based on their content.
Use Case Examples
- Automatically classify scanned invoices and receipts in an accounting workflow.
- Categorize uploaded contracts by type for legal document management.
- Classify images of documents fetched from URLs for content-based routing.
Properties
| Name | Meaning |
|---|---|
| Input Type | How to provide the document for classification, either as binary data from a previous node or as an image URL. |
| Binary Property | Name of the binary property in the input item that contains the file to classify. Used only if Input Type is binary. |
| Image URL | URL of the image to classify. Used only if Input Type is URL. |
| Model | The classification model to use, fixed as 'document-classify'. |
| Schema Name | Name of the schema used for classification, fixed as 'document-classify'. |
| Schema Input Type | How to define the classification categories, either via a form input or raw JSON schema. |
| Classification Categories | The categories for document classification defined via form input, each with a label and description. |
| Raw JSON Schema | Raw JSON array defining the classification schema, used if schema input type is JSON. |
| Return | What to return from the node: either just the classification result or the full API response. |
Output
JSON
classification- The classification label returned by the model.confidence- Confidence level of the classification result, 'high' or 'low'.error- Error message if classification failed.
Dependencies
- Requires an API key credential for the Upstage Document Classification API (referred to as 'blabApi' credential).
Troubleshooting
Error 'No binary data found in property "".' occurs if the specified binary property does not exist or is empty in the input item. Ensure the correct binary property name is provided and the previous node outputs binary data.
- Error 'Image URL is required when input type is URL.' occurs if the input type is set to URL but no URL is provided. Provide a valid image URL.
- Error 'Raw JSON schema is required when input type is JSON.' occurs if the raw JSON schema is empty when schema input type is set to JSON. Provide a valid JSON schema array.
Error 'Invalid JSON format: ' occurs if the raw JSON schema is not valid JSON or not an array. Validate the JSON format before input. - If the API returns unexpected results or low confidence, verify the classification categories and ensure the document image quality is sufficient.
Links
- Upstage Document Classification API - Official API documentation for the document classification service used by this node.