Google IDX icon

Google IDX

Google IDX

Overview

This node integrates with Google Cloud Workstations via the Google IDX API, enabling management and interaction with cloud-based development environments. It supports operations such as generating access tokens, starting/stopping workstations, retrieving workstation status, running commands remotely, and initializing workstation data.

Common scenarios include automating workstation lifecycle management in CI/CD pipelines, securely obtaining access tokens for remote sessions, monitoring workstation states, and executing commands within workstations programmatically.

For example, a developer can use this node to generate an access token to connect to a specific Google Cloud Workstation or to start/stop a workstation based on workflow triggers.

Properties

Name Meaning
Project ID Select or enter your Google Cloud project ID. Supports selecting from a list of projects or entering an ID manually.

The node also uses an Operation property (not listed in the provided JSON but evident in code) with options including:

  • generateAccessToken
  • startWorkstation
  • stopWorkstation
  • getWorkstation
  • resetWorkstation
  • liveWorkstation
  • workstationInitialization
  • getStatusWorkstation
  • manualWorkstation
  • runCommandWorkstation

These operations determine the action performed by the node.

Output

The node outputs JSON objects whose structure depends on the selected operation:

  • For generateAccessToken, it returns the OAuth2 response containing the access token.
  • For startWorkstation, stopWorkstation, and getWorkstation, it returns the respective API responses.
  • For liveWorkstation, it returns an array of workstation statuses with fields like statusCode, status (e.g., "running", "stopped"), and workstation name.
  • For workstationInitialization, it outputs aggregated data about users and their workspaces.
  • For getStatusWorkstation, it categorizes workstations by state (STATE_STARTING, STATE_RUNNING, STATE_STOPPED).
  • For manualWorkstation and runCommandWorkstation, it returns command execution results including timestamps, exit codes, stdout, stderr, and related metadata.

If binary data is involved (e.g., in command execution output), it is represented as text fields (stdout, stderr) rather than raw binary.

Dependencies

  • Requires an API key credential with OAuth2 authentication configured for Google IDX API access.
  • Uses Google Cloud Workstations API endpoints.
  • Depends on n8n's OAuth2 helper methods for authenticated requests.
  • Utilizes external Node.js modules: child_process for executing shell commands, p-limit for concurrency control.
  • Requires proper configuration of Google Cloud project and workstation clusters.

Troubleshooting

  • Missing or invalid Project ID: The node requires a valid Google Cloud project ID for most operations. Ensure the Project ID is correctly set.
  • Authentication errors: If OAuth2 credentials are misconfigured or expired, requests will fail. Refresh or reconfigure credentials.
  • Unsupported operation error: Selecting an operation not implemented by the node will throw an error.
  • Command execution failures: When running commands inside workstations, errors from the underlying shell or Docker container may occur. Check stderr and exitCode in the output for diagnostics.
  • Rate limiting or transient API errors: The node retries certain HTTP 503/504 errors with exponential backoff. Persistent failures may indicate quota limits or network issues.
  • Invalid input format for manual commands: The manualWorkstation operation expects a specific command string format; incorrect formatting will cause errors.

Links and References

Discussion