@salesmind-ai/n8n-nodes-vertex-advanced-chat-model
v1.1.1
Published
n8n community nodes for Google Vertex AI and Gemini Chat Models with labels support for billing cost tracking
Maintainers
Keywords
Readme
n8n-nodes-vertex-advanced-chat-model
This is an n8n community node. It lets you use Google Vertex AI generative models (Gemini) as a chat model in your n8n AI workflows, with added support for request labels for billing cost tracking.
Google Vertex AI is Google Cloud's machine learning platform that provides access to Gemini and other generative AI models.
n8n is a fair-code licensed workflow automation platform.
Installation | Credentials | Node Reference | Compatibility | Usage | Resources | Version History
Installation
Follow the installation guide in the n8n community nodes documentation.
Credentials
This node reuses the built-in Google Service Account API credential (googleApi) that ships with n8n. You do not need to configure a new credential type.
To set up the credential you need:
- A Google Cloud project with the Vertex AI API enabled.
- A service account with the
Vertex AI Userrole (or equivalent). - A JSON key file for that service account.
In the n8n credential form, fill in:
| Field | Description |
| ------------------------- | ---------------------------------------------------------- |
| Service Account Email | The client_email from the JSON key file |
| Private Key | The private_key from the JSON key file |
| Region | The GCP region to use (e.g. us-central1, europe-west1) |
Node Reference
The Google Vertex Advanced Chat Model node is an AI sub-node that outputs a language model. Connect it to an AI Agent, AI Chain, or any node that accepts an AI Language Model input.
Parameters
| Parameter | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Project ID | Your Google Cloud project ID. Select from a dropdown list or enter manually. |
| Model Name | The Gemini model to use (default: gemini-2.5-flash). See available models. |
| Labels | Key-value pairs attached to each API request for billing cost tracking. See Vertex AI labels documentation. |
Options
| Option | Description | Default | | ---------------------------- | ---------------------------------------------------------- | ------- | | Maximum Number of Tokens | Max tokens to generate in the completion | 2048 | | Safety Settings | Configure content safety filters by category and threshold | - | | Sampling Temperature | Controls randomness (0 = deterministic, 1 = creative) | 0.4 | | Thinking Budget | Reasoning tokens for thinking models (-1 = dynamic) | -1 | | Top K | Limits token selection to top K candidates (-1 = disabled) | 32 | | Top P | Nucleus sampling threshold | 1 |
What makes this different from the built-in node?
The built-in Google Vertex Chat Model node (lmChatGoogleVertex) does not support the Labels parameter. This node adds that capability, allowing you to tag every Vertex AI API request with custom key-value labels for cost attribution, team tracking, environment tagging, or any other billing dimension supported by Google Cloud.
Compatibility
- Minimum n8n version: 1.123.12
- Tested with: n8n 1.123.12
- Dependencies: Uses
@langchain/[email protected]and@google-cloud/[email protected], matching the versions shipped with n8n 1.123.12.
Usage
- Add an AI Agent or AI Chain node to your workflow.
- Connect the Google Vertex Advanced Chat Model node to the model input.
- Select your Google Service Account credential.
- Choose your project and model.
- (Optional) Add labels for billing tracking, e.g.
team: sales,env: production.
Example: Cost tracking with labels
Add labels to attribute API costs to specific teams or projects:
- Key:
team, Value:marketing - Key:
project, Value:content-generation - Key:
environment, Value:production
These labels will appear in your Google Cloud billing reports, allowing you to break down Vertex AI costs by any dimension you define.
Resources
- n8n community nodes documentation
- Google Vertex AI documentation
- Vertex AI available models
- Vertex AI labels for billing
Version History
0.1.0
Initial release.
- Google Vertex AI Chat Model with full feature parity with the built-in node
- Added Labels parameter for billing cost tracking
- Project ID dropdown with GCP project list
- All standard options: temperature, top K, top P, max tokens, safety settings, thinking budget
