Actions5
Generate Access Token
AI-generatedOverview
This node, named "Google IDX Action," is designed to perform actions using selected Google OAuth2 credentials related to Google Cloud projects and workstations. Specifically, it supports generating access tokens for Google Cloud workstations among other operations like starting, stopping, or running commands on workstations.
A common use case is automating interactions with Google Cloud workstation environments, such as programmatically generating access tokens needed for authentication or managing workstation lifecycle (start/stop). For example, a user might generate an access token to authenticate API requests or start a specific workstation cluster before running development tasks.
Properties
| Name | Meaning |
|---|---|
| Is List | Boolean flag indicating whether the input is treated as a list of commands or a single command. |
| Credentinals Name | Select or enter your Google Cloud project credential. Options: - From List (select from existing accounts) - By Name (enter credential name manually) |
| Project ID | Select or enter your Google Cloud project ID. Available only when "Is List" is false. Options: - From List (select from available GCP projects) |
Output
The node outputs JSON data representing the result of the executed action on the Google Cloud workstation(s). The output JSON typically contains details about the generated access token or the status/result of the requested operation (e.g., start, stop, run command).
If multiple workstations are targeted (when "Is List" is true), the output will be an array of JSON objects corresponding to each workstation's response.
No binary data output is indicated in the code.
Dependencies
- Requires an API key credential for authenticating with the n8n backend service that manages Google IDX OAuth2 credentials.
- Relies on internal helper methods to fetch credentials and make HTTP requests to the n8n backend REST API.
- Uses a sub-workflow template (
subWorkflowTemplate.json) to execute the actual Google IDX operations. - Requires proper configuration of Google Cloud projects and associated OAuth2 credentials within n8n.
Troubleshooting
- Missing or invalid input: If the credential input is missing or not a string when expected, the node throws an error. Ensure the credential is properly selected or entered.
- Invalid input format: The node expects commands in a specific format (e.g.,
/run -a USER -ws SLUG[,SLUG2] [-c COMMAND]). Providing incorrectly formatted input will cause errors. - No workspace found: If no matching workspace is found for the provided slugs, the node throws an error. Verify that the workspace names/slugs are correct and exist in the selected project.
- Credential issues: Errors during credential fetching or API calls may occur if the API key or OAuth2 credentials are misconfigured or expired.
- Execution errors: Any failure in executing the sub-workflow or API request will throw an error with the underlying message. Check network connectivity and credential validity.