Actions5
Get Workstation
AI-generatedOverview
This node, named "Google IDX Action," is designed to perform various workstation-related operations using Google OAuth2 credentials linked to Google Cloud projects. It supports actions such as retrieving workstation information, starting, stopping, checking status, generating access tokens, or running custom commands on workstations within specified Google Cloud project environments.
Common scenarios where this node is beneficial include:
- Automating management of cloud-based development workstations.
- Integrating workstation lifecycle controls into workflows (e.g., start/stop workstations based on triggers).
- Fetching workstation details for monitoring or auditing purposes.
- Running custom commands remotely on workstations via Google Cloud infrastructure.
Practical example:
- A developer wants to automatically start a specific workstation before beginning a coding session and stop it afterward to save costs. This node can be configured to trigger those actions programmatically.
- An admin needs to retrieve the current status of multiple workstations across projects to generate a report.
Properties
| Name | Meaning |
|---|---|
| Is List | Boolean flag indicating whether to process multiple workstations or a single one. |
| Credentinals Name | Select or enter your Google Cloud project credential. Supports selecting from a list or entering by name. |
| Project ID | Select or enter your Google Cloud project ID. Visible only when "Is List" is false. |
Output
The node outputs JSON data representing the result of the requested workstation operation. The structure depends on the operation performed but generally includes workstation details or command execution results.
If multiple workstations are processed ("Is List" = true), the output contains an array with each element corresponding to a workstation's response.
Binary data output is not indicated in the code; thus, the node primarily outputs JSON-formatted data.
Dependencies
- Requires a valid Google OAuth2 credential configured in n8n to authenticate API requests.
- Depends on an internal helper function to fetch and filter Google Cloud projects and accounts.
- Uses a sub-workflow template (
subWorkflowTemplate.json) to execute detailed workstation operations. - Requires network access to the Google Cloud environment and the relevant APIs for workstation management.
Troubleshooting
- Missing or invalid input error: Occurs if the credential or input string format is incorrect or missing. Ensure that the credential is selected properly and input strings follow the expected pattern.
- Invalid input format error: The node expects inputs matching the pattern
/[run|start|stop|status|token] -a USER -ws SLUG[,SLUG2] [-c COMMAND]. Verify that the input matches this format exactly. - No workspace found error: If no matching workspace is found for the provided slugs, check that the workspace names are correct and exist under the selected project.
- Credential issues: If authentication fails, verify that the Google OAuth2 credential is valid and has necessary permissions.
- Execution errors from sub-workflow: Errors thrown during the execution of the embedded workflow will propagate. Review the sub-workflow configuration and ensure all required parameters and credentials are correctly set.