Extract Key Values
Extracts key-value pairs from documents using Google Document AI.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- File Path - The local file path of the document to process.
- MIME Type - The MIME type of the document. If not provided, it will be auto-detected.
Output
- Pages - An array of pages, each containing extracted key-value pairs.
Options
- Credentials - Google Document AI credentials used to authenticate with the service.
- Project Id - The Google Cloud project ID associated with your Document AI processor.
- Location - The location of the Document AI processor. Default is "us".
- Processor Id - The ID of the Document AI processor to use for key-value extraction.
How It Works
The Extract Key Values node integrates with Google Document AI to extract key-value pairs from documents. When executed, the node:
- Validates the provided inputs (File Path, MIME Type)
- Authenticates with Google Document AI using the provided credentials
- Reads the specified document file
- Processes the document using the specified Document AI processor
- Extracts key-value pairs from form fields in the document
- Organizes the extracted key-value pairs by page
- Returns the organized results as output
Requirements
- Valid Google Document AI credentials
- A valid Google Cloud project ID
- A configured Document AI processor for key-value extraction
- A valid local file path to a document
- Valid processor ID and location
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid File Path
- Empty or invalid Project ID
- Empty or invalid Processor ID
- Google Document AI service errors
- Unable to read the specified file
- Invalid credentials
Usage Notes
- The File Path should point to a local document file (PDF, images, etc.)
- If MIME Type is not provided, it will be auto-detected from the file content
- The Project Id, Location, and Processor Id are required for Document AI processing
- The output is organized by pages, with each page containing its extracted key-value pairs
- Key-value pairs are extracted from form fields in the document
- This node is particularly useful for processing forms, invoices, and other structured documents
- The Location option specifies the geographic location of your Document AI processor (e.g., "us", "eu")