Google IDX icon

Google IDX

Google IDX

Overview

This node integrates with Google Cloud Workstations, allowing users to manage and interact with their cloud-based development environments programmatically within n8n workflows. Specifically, the "Run Command Workstation" operation enables executing arbitrary shell commands inside a specified Google Cloud Workstation via the gcloud CLI running in a Docker container.

Common scenarios where this node is beneficial include:

  • Automating routine maintenance or setup tasks on cloud workstations.
  • Running build scripts, tests, or deployment commands remotely.
  • Integrating workstation command execution into larger CI/CD pipelines or developer workflows.

For example, a user can run a custom script inside a workstation to update dependencies or gather logs without manually connecting to the environment.

Properties

Name Meaning
Project ID Select or enter your Google Cloud project ID. Can be chosen from a list of projects or entered as a string ID.
Gcloud CLI The name of the Docker container running the gcloud CLI used to execute commands. Default is "n8n-gcloud-1".
Command The shell command string to run inside the specified Google Cloud Workstation.

Output

The node outputs JSON data containing details about the executed command and its context:

  • timestamp: Unix timestamp when the command was executed.
  • accessToken: OAuth2 access token used for authentication.
  • project: Google Cloud project ID.
  • region: Region of the workstation.
  • cluster: Workstation cluster name.
  • config: Workstation configuration name.
  • workstation: Workstation instance name.
  • exitCode: Exit code returned by the command.
  • stdout: Standard output from the command execution.
  • stderr: Standard error output from the command execution.

This output allows downstream nodes to process command results, handle errors, or log execution details.

Dependencies

  • Requires an API key credential with OAuth2 authentication configured for Google Cloud (referred generically as "an API key credential").
  • The node expects a Docker container running the gcloud CLI (Gcloud CLI property) accessible by the n8n runtime.
  • The gcloud CLI must be configured to allow SSH connections to the target workstation.
  • Environment must have network access to Google Cloud APIs and the workstation instances.

Troubleshooting

  • Missing or invalid Project ID: The node throws an error if the Project ID is not provided or invalid. Ensure the correct project is selected or entered.
  • Docker container not found or inaccessible: If the specified gcloud CLI container does not exist or cannot be accessed, command execution will fail.
  • Authentication failures: Errors related to OAuth2 tokens may occur if credentials are expired or misconfigured. Refresh or reconfigure the API key credential.
  • Command execution errors: Non-zero exit codes or stderr output indicate issues with the command itself or workstation state. Review the command syntax and workstation availability.
  • Timeouts or network errors: Network connectivity issues to Google Cloud or the workstation may cause retries or failures.

Links and References

Discussion