Skip to main content

Connect

Establishes a connection to Google Cloud Storage service and creates a reusable client session for subsequent storage 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.

Output

  • GCS Client Id - Unique identifier for the established Google Cloud Storage client session. This ID should be passed to other Storage nodes to reuse the connection.

Options

  • Credentials - Google Cloud service account credentials in JSON format. Required for authentication with the Cloud Storage API.

How It Works

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

  1. Validates the provided Google Cloud service account credentials
  2. Authenticates with Google Cloud Storage API
  3. Creates a storage client instance
  4. Generates a unique client ID
  5. Stores the client session for reuse by other nodes
  6. Returns the client ID as output

Example

Basic Connection

// The Connect node outputs a GCS Client ID
// This ID is automatically stored in the message context
// and can be used by subsequent GCS nodes

// Example: Connect and then upload a file
// 1. Connect node creates gcs_id
// 2. Upload File node uses gcs_id to upload data.csv

Using Connect with Multiple Operations

// Connect once at the beginning of your flow
// Then perform multiple operations using the same connection

// Flow structure:
// Connect → Upload File → List Objects → Read Object
// All nodes use the same gcs_id from Connect

Requirements

  • Valid Google Cloud service account credentials with appropriate permissions
  • Cloud Storage API enabled in your Google Cloud project
  • Appropriate IAM roles assigned to the service account:
    • roles/storage.admin for full access
    • roles/storage.objectAdmin for object operations
    • roles/storage.objectViewer for read-only access

Error Handling

The node will return specific errors in the following cases:

Error CodeDescription
ErrCredentialsInvalid, missing, or malformed credentials
ErrRuntimeFailed to create storage client (authentication or API errors)

Common error scenarios:

  • Invalid or missing Google Cloud credentials
  • Credentials file not in valid JSON format
  • Service account doesn't have Cloud Storage permissions
  • Cloud Storage API not enabled in the project
  • Network connectivity issues

Usage Notes

  • This node should be executed before using other Google Storage nodes
  • The output GCS Client Id is required as input for other Storage operations
  • Alternatively, you can provide credentials directly to each node without using Connect
  • The connection remains active for the duration of the flow execution
  • Multiple Connect nodes can be used to establish connections to different Google Cloud projects
  • The client identifier is automatically managed and cleaned up by the system
  • Storing the connection improves performance when performing multiple operations

Tips for Effective Use

  • Use Connect node when performing multiple GCS operations in a single flow
  • For one-off operations, consider providing credentials directly to the node
  • Store credentials in Robomotion Vault for security
  • Ensure service account has minimum required permissions
  • Test connection with a simple operation like List Buckets before complex workflows
  • Use meaningful variable names when storing the GCS Client ID

Common Errors and Solutions

Error: "No Credentials Content"

  • Solution: Ensure the credentials file is properly formatted JSON
  • Verify the credentials are stored correctly in Vault or provided as input

Error: "Failed to create storage client"

  • Solution: Check if Cloud Storage API is enabled in your Google Cloud project
  • Verify network connectivity and firewall settings
  • Ensure service account credentials are valid and not expired

Connection works but operations fail

  • Solution: Check IAM permissions for the service account
  • Verify the service account has access to the specific bucket or project