Hi,
I'm trying to call the Google Vertex AI Gemini API (e.g., gemini-1.5-pro or gemini-1.0-pro-vision-latest) from n8n using a Google Service Account credential, but I'm stuck on authentication/permission errors.
The Problem:
- The n8n "Google Service Account" credential fails to save when I paste the full JSON key content (error: "Couldn't connect with these settings" / likely "secretOrPrivateKey must be an asymmetric key..." error).
- It only saves if I paste just the private key block (-----BEGIN...END-----). The "Upload file" option is missing in my n8n Cloud UI.
- However, when using the credential saved this way, API calls via the HTTP Request node fail with either 404 Not Found (even for gemini-1.0-pro-vision-latest in us-central1) or 400/403 Bad Request (e.g., Project 297... is not allowed to use Publisher Model projects/creamusai/...).
Context:
- n8n Version: 1.87.1 (latest Beta)
- n8n Setup: n8n Cloud
- GCP Project checks (APIs enabled: Vertex AI, IAM Credentials; SA roles assigned: Vertex AI User + SA Token Creator; Billing linked & active) all seem correct for the target project (creamusai, number 297...).
- Multiple new keys were generated and tested. JSON key syntax validated.
It seems there's an issue with how n8n Cloud handles the Google Service Account credential in this version, either during saving with the full JSON or during the actual authentication request when saved with only the key block. How can I resolve this to successfully call the Vertex AI API?
Thanks!
Marko