How to authenticate Google Vertex AI (Gemini) node in n8n without using Service Account private key?

We’re trying to use the **Google Vertex AI → Gemini model** with the built-in Vertex AI model node in n8n, but our environment **does not allow using a Service Account private key JSON file**.

We want to authenticate to Vertex AI **without using the private key** (e.g., OAuth, ADC, Workload Identity, or API key if possible) and still use the official Vertex AI node (not custom HTTP Request).

Is there a supported way to configure this in n8n? If not:

  1. Is there a recommended alternative node or workflow?
  2. Any community-built node that supports non-JSON key authentication?
  3. Best approach for secure Google auth for Vertex AI in n8n without storing a private key?
1 Like

Hi @Shabbir_Anjum Welcome!
You can try Google’s AI Studio which is personally use, but that would not give you google Vertex. And i guess a service account is by far needed proper auth and full features of that service. I would say using Gemini models with AI Studio is better but for Vertex the traditional path is the most reliable one.

The Vertex AI node only supports service account JSON keys right now, there’s actually an open PR (#22942) to add ADC support but it hasn’t been merged yet. If you’re running n8n on GCP (Cloud Run/GKE) your best bet is using the HTTP Request node to grab a token from the metadata server at runtime and hit the Vertex AI REST API directly, no keys stored in n8n that way.