Actions11
Generate Access Token
AI-generatedOverview
This node integrates with Google Cloud Workstations via the Google IDX API, enabling management and interaction with cloud-based development environments. The "Generate Access Token" operation specifically requests an access token for a given Google Cloud project’s workstation cluster, which can be used to authenticate further API calls or sessions.
Common scenarios where this node is beneficial include:
- Automating authentication workflows for Google Cloud Workstations.
- Programmatically managing access tokens to enable secure, temporary access to workstations.
- Integrating Google Cloud Workstations into broader CI/CD pipelines or developer tooling automation.
Practical example:
- A DevOps engineer uses this node to generate access tokens for multiple projects automatically, allowing developers to connect securely to their assigned cloud workstations without manual token generation.
Properties
| Name | Meaning |
|---|---|
| Project ID | Select or enter your Google Cloud project ID. Can be chosen from a list of available projects or entered manually as a string. |
| 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. This allows sharing state across executions. |
Output
The output JSON structure for the "Generate Access Token" operation contains the response from the Google IDX API's access token generation endpoint. It typically includes fields such as:
accessToken: The generated access token string.expireTime: Expiration timestamp of the token.- Other metadata related to the workstation environment.
Example output snippet (simplified):
{
"accessToken": "ya29.a0AfH6SM...",
"expireTime": "2024-06-30T12:34:56Z",
...
}
No binary data output is produced by this operation.
Dependencies
- Requires an OAuth2 API credential configured in n8n for authenticating with Google IDX services.
- The node depends on Google Cloud Workstations APIs and requires appropriate permissions granted to the OAuth2 credential.
- No additional external services or environment variables are explicitly required beyond the OAuth2 setup.
Troubleshooting
Common issues:
- Invalid or missing Project ID: Ensure the Project ID is correctly selected or entered.
- Authentication failures: Verify that the OAuth2 credential has valid tokens and sufficient scopes.
- API errors due to insufficient permissions: Confirm the service account or user has access to the target Google Cloud project and workstation resources.
Error messages:
"Unsupported operation": Occurs if an unsupported operation name is provided; verify the operation parameter."Project ID is required for running commands.": Indicates missing Project ID when required; provide a valid Project ID.- Network or API request errors: Check network connectivity and Google Cloud API status.
Resolving these usually involves checking input parameters, refreshing OAuth2 credentials, and ensuring correct Google Cloud IAM roles.