Google IDX icon

Google IDX

Google IDX

Update Workstation

AI-generated

Overview

This node integrates with Google Cloud Workstations via the Google IDX API, enabling management and control of workstations within a Google Cloud project. It supports various operations such as updating workstation details, starting/stopping workstations, generating access tokens, retrieving status, and running commands remotely.

A common use case is automating workstation lifecycle management in CI/CD pipelines or development workflows, where developers or DevOps engineers need to programmatically update configurations, check statuses, or execute commands on cloud-hosted workstations without manual intervention.

For example, the "Update Workstation" operation allows users to update workstation state by providing workspace URLs, which can be useful when synchronizing workstation metadata or refreshing access tokens.

Properties

Name Meaning
Project ID Select or enter your Google Cloud project ID. Options: From List (searchable projects) or ID string input.
WorkSpace URL A string containing one or more workspace URLs (comma-separated) used for updating workstation information.
Is Global Data Boolean flag indicating whether to use global workflow static data (true) or node-specific data (false).
Global Data JSON object representing global data to be used if "Is Global Data" is set to true.

Output

The node outputs an array of JSON objects, each corresponding to the result of the executed operation per input item. The structure varies depending on the operation:

  • For Update Workstation, output includes parsed workstation details extracted from workspace URLs, such as:

    • project_id: The numeric project number.
    • location: The location/region of the workstation.
    • cluster: The cluster identifier.
    • workspace: The workspace slug.
  • For other operations like start/stop/generate token, it returns the raw API response JSON.

  • For status checks, it outputs categorized lists of workstations by their states (starting, running, stopped).

  • For command execution, it returns detailed command execution results including timestamps, exit codes, stdout, stderr, and related metadata.

If binary data were involved, it would typically represent files or command outputs, but this node primarily deals with JSON responses.

Dependencies

  • Requires an OAuth2 API credential configured for Google IDX API access.
  • Uses Google Cloud Workstations API endpoints.
  • Relies on n8n's OAuth2 credential system for authentication.
  • Executes some shell commands (e.g., via Docker and gcloud CLI) for running remote commands on workstations.
  • Requires proper permissions on the Google Cloud project to manage workstations.

Troubleshooting

  • Missing or invalid Project ID: Many operations require a valid Google Cloud project ID. Ensure the project ID is correctly selected or entered.
  • Invalid Workspace URL format: The "Update Workstation" operation expects comma-separated URLs that contain encoded tokens. Malformed URLs will cause errors.
  • Authentication errors: If OAuth2 credentials are expired or misconfigured, API calls will fail. Refresh or reconfigure credentials as needed.
  • Command execution failures: When running commands via gcloud CLI inside Docker, ensure the Docker container and gcloud CLI are properly set up and accessible.
  • Unsupported operation error: If an unsupported operation name is provided, the node throws an error specifying the unsupported operation.
  • Token missing in Update Workstation: If the expected token cannot be extracted from the workspace URL, an error is thrown indicating "No token".

Links and References

Discussion