Hi everyone,
I'm facing a persistent challenge when trying to authenticate to Google Cloud using a Service Account credential within callin.io Cloud (v1.86.1) and would greatly appreciate any insights the community might offer.
My Objective:
To obtain a GCP access token by using a Service Account credential (Google Service Account API type) for making calls to the Vertex AI API.
The Issue:
My credential, named GCP Vertex AI Key, tests successfully in the callin.io Credentials UI (“Connection tested successfully”). However, when I utilize the standard expression to generate the JWT assertion in my workflow, the function seems to return null.
Troubleshooting Steps & Setup:
-
Credential Verification: The GCP Vertex AI Key (type Google Service Account API) passes its tests.
-
Key Re-generation: I've regenerated the service account key file in GCP and meticulously updated the “Service Account Email” and “Private Key” fields in the callin.io credential. The credential continues to test successfully after this update.
-
Direct HTTP Request Failure: Initially, using the expression directly in the assertion field of the HTTP Request node (targeting https://oauth2.googleapis.com/token with a Form-Urlencoded body) resulted in a 400 error “Missing required parameter: assertion”, indicating the expression wasn't evaluating correctly in that context.
-
Set Node Test: To isolate the problem, I've added a Set node (Prepare Assertion) immediately before the HTTP Request node (Get GCP Auth Token).
-
The configuration for the Set node is:
-
Field Name: jwt_assertion
-
Value (Expression): {{ $credentials["GCP Vertex AI Key"].signJwt("https://www.googleapis.com/auth/cloud-platfor m" rel="noopener nofollow ugc"> https://oauth2.googleapis.com/toke n","https://www.googleapis.com/auth/cloud-platform") }}
-
-
Set Node Result: This Prepare Assertion node runs without errors, but upon inspecting its JSON output, the value for “jwt_assertion” is “jwt_assertion”: null.
-
HTTP Request Node Configuration: The Get GCP Auth Token node is set up to use the output from the Set node:
-
Method: POST
-
Body Content Type: Form-Urlencoded
-
Body Parameters:
-
grant_type: urn:ietf:params:oauth:grant-type:jwt-bearer
-
assertion: {{ $json.jwt_assertion }}
-
- HTTP Request Node Failure: As expected, this node fails with the 400 “Missing required parameter: assertion” because the $json.jwt_assertion it receives is null.
GCP Configuration Verified:
-
The Service Account (n8n-vertex-ai-user@…) is active in GCP.
-
The relevant Service Account Key is active.
-
The Service Account has the Vertex AI User role assigned in the project IAM settings.
-
The IAM Service Account Credentials API and Vertex AI API are enabled in the GCP project.
My Question:
Has anyone else encountered the $credentials["Credential Name"].signJwt(...) function returning null even when the credential itself tests successfully and the GCP setup appears correct? Could this be a known issue, possibly with callin.io Cloud v1.86.1, or is there another configuration aspect I might be overlooking? Any suggestions for further debugging would be highly appreciated!
Environment:
-
callin.io Version: 1.86.1
-
Hosting: callin.io Cloud
-
Workflow ID (if relevant): 4lhWVo6GxWAQF8bL
Thanks in advance for any assistance!