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 retrieving workstation details, starting or stopping workstations, generating access tokens, running commands inside workstations, and monitoring their status.

Common scenarios include:

  • Automating the lifecycle of cloud workstations for development teams.
  • Fetching real-time status and metadata about specific workstations.
  • Executing remote commands within a workstation environment using gcloud CLI.
  • Managing access tokens for secure authentication to workstations.

For example, a developer can use this node to programmatically start a workstation before beginning work, check its status during use, run setup scripts remotely, and then stop it when done, all within an n8n workflow.

Properties

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

Note: The provided properties JSON only includes "Project ID" relevant for the "Get Workstation" operation and others except some excluded operations.

Output

The node outputs JSON data structured according to the operation performed:

  • For Get Workstation operation, the output JSON contains detailed information about the requested workstation retrieved from the Google Workstations API.
  • For other operations like start/stop/generateAccessToken, the output JSON reflects the API response confirming the action's success or failure.
  • For running commands inside a workstation, the output JSON includes execution details such as timestamp, access token used, project info, exit code, standard output, and error output.
  • For status checks, the output groups workstations by their state (starting, running, stopped) with arrays listing workstation identifiers.
  • When initializing workstations, the output summarizes total users, total items, and workspace details grouped by user and workspace slug.

If binary data is involved (not evident in the provided code), it would typically represent files or command outputs, but here the focus is on JSON responses.

Dependencies

  • Requires an OAuth2 API credential configured in n8n for authenticating requests to Google IDX APIs.
  • Uses Google Cloud Workstations API endpoints.
  • Depends on gcloud CLI installed and accessible if running commands inside workstations.
  • Uses Node.js child process execution to run shell commands for command execution inside workstations.
  • Requires proper permissions on the Google Cloud project to manage workstations.

Troubleshooting

  • Missing or invalid Project ID: The node requires a valid Google Cloud project ID for most operations. Ensure the property is set correctly.
  • Authentication errors: If OAuth2 credentials are misconfigured or expired, API calls will fail. Refresh or reconfigure credentials.
  • Command execution failures: Running commands inside workstations depends on Docker container availability and correct gcloud CLI setup. Errors may occur if the container name or CLI path is incorrect.
  • Invalid input format for manual commands: The node expects specific command formats; invalid inputs throw errors with guidance on expected syntax.
  • API rate limits or transient errors: The node implements retries for HTTP 503/504 errors, but persistent failures indicate service issues or quota exhaustion.
  • Unsupported operations: Attempting an unsupported operation results in a clear error message indicating the operation is not supported.

Links and References

Discussion