Skip to main content

Connect

Establishes a connection to Google Vision API service for subsequent image analysis operations.

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

No inputs required for this node.

Options

  • Credentials - The Google Cloud credentials required to authenticate with the Vision API service.

Output

  • Vision Id - A unique identifier for the established Vision API client connection that can be used by other Vision nodes.

How It Works

The Connect node establishes a connection to the Google Vision API service using the provided credentials. When executed, the node:

  1. Retrieves the provided credentials and validates them
  2. Creates a new ImageAnnotatorClient using the Google Cloud Vision API
  3. Stores the client connection and assigns it a unique ID
  4. Returns the unique Vision ID that can be used by other nodes

Requirements

  • Valid Google Cloud credentials with appropriate permissions for Vision API
  • Enabled Vision API in your Google Cloud project
  • Proper network access to Google Cloud services

Error Handling

The node will return specific errors in the following cases:

  • Invalid or missing credentials
  • Authentication failures
  • Network connectivity issues
  • Vision API service errors

Usage Notes

  • The Vision ID output should be passed to other Vision nodes that require a connection
  • The credentials should have appropriate permissions for the Vision API services you plan to use
  • This connection should be established before using any other Vision nodes
  • The connection is managed internally and doesn't require explicit disconnection
  • Alternative: You can provide credentials directly to each Vision node instead of using Connect

Example Use Cases

Process Multiple Images with Single Connection

1. Connect node with Google Cloud credentials
Output: vision_client_id

2. Image to Text node
Input: vision_client_id, image1.jpg
Output: Extracted text from image 1

3. Image to Text node
Input: vision_client_id, image2.jpg
Output: Extracted text from image 2

4. Extract Image Labels node
Input: vision_client_id, product.jpg
Output: Product labels

Invoice Processing Workflow

1. Connect node
Credentials: Google Cloud service account
Output: vision_client_id

2. Image to Text node
Input: vision_client_id, /invoices/invoice_001.jpg
Output: Raw invoice text

3. Programming > Evaluate node
Parse extracted text to extract invoice number, date, amount

Batch Image Analysis

1. Connect node once at the start
Output: vision_client_id

2. Loop through folder of images
For each image:
- Image to Text: Extract text
- Extract Image Labels: Get labels
- Check Image Safety: Verify content
All using the same vision_client_id

Tips

  • Reuse Connections: Create one connection and reuse it across multiple Vision nodes to improve performance
  • Credential Storage: Store Google Cloud credentials in Robomotion's vault for security
  • Service Account: Use a dedicated service account with minimum required permissions
  • Error Recovery: Wrap Connect node in error handling to manage authentication failures gracefully
  • Direct Credentials Option: For single operations, you can skip Connect and provide credentials directly to Vision nodes

Setting Up Google Cloud Credentials

  1. Go to Google Cloud Console
  2. Create or select a project
  3. Enable the Cloud Vision API
  4. Create a service account:
    • Go to IAM & Admin > Service Accounts
    • Click "Create Service Account"
    • Grant the role: "Cloud Vision API User" or "Cloud Vision API Admin"
  5. Create and download a JSON key for the service account
  6. Store the JSON content in Robomotion vault
  7. Use the vault credential in the Connect node