Image To Text
Extracts text from images using Google Vision API's optical character recognition (OCR) feature.
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
- Vision Client Id - The unique identifier of the Vision API connection, typically obtained from the Connect node.
- Image Path - The file path to the image from which to extract text.
Options
No additional options available for this node.
Output
- Confidence - An object containing confidence scores for each page of text detected.
- Text - The extracted text from the image, or "No text found" if no text is detected.
How It Works
The Image To Text node uses optical character recognition (OCR) to extract text from images using Google Vision API. When executed, the node:
- Retrieves the Vision API client using the provided client ID
- Validates that the image path is not empty
- Opens and reads the image file from the specified path
- Creates a Vision API image object from the file
- Calls the DetectDocumentText method to extract text from the image
- Processes the results and returns both the extracted text and confidence scores
Requirements
- A valid connection to Vision API established with the Connect node
- Valid Google Cloud credentials with appropriate permissions
- An image file accessible from the specified path
- Enabled Vision API in your Google Cloud project
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Vision Client ID
- Empty image path
- Invalid image file path
- File read errors
- Invalid image format
- Network connectivity issues
- Vision API service errors
- Authentication failures
Usage Notes
- The Vision Client ID must be obtained from a successful Connect node execution
- The image file must be accessible from the specified path
- Supported image formats include JPEG, PNG, GIF, BMP, and TIFF
- Works with printed and handwritten text in many languages
- The node returns the complete text found in the image
- Confidence scores indicate the reliability of the text detection for each page
- If no text is found, the output will be "No text found"
- Text extraction quality depends on image quality, font, and text clarity
- This node is useful for digitizing documents, extracting information from images, and processing forms