Use this robust n8n workflow to authenticate with Google Service Accounts and securely call private Cloud Run endpoints. Features JWT signing and Bearer token exchange.
Download this n8n workflow template and start using it instantly.
This secure n8n workflow is ideal for:
Developers needing to integrate internal, authenticated Google Cloud Run APIs into their business processes.
Automation engineers building reliable n8n templates for accessing secure cloud infrastructure.
Calling securely authenticated services, like private Google Cloud Run endpoints, requires a complex multi-step process involving Google Service Accounts and JWT signing. This specialized n8n workflow eliminates the manual effort and boilerplate code required for this task.
Instead of relying on simpler API key authentication (which often lacks proper security), this n8n automation uses the standard Google Service Account flow: signing a JWT, exchanging it for an ID token, and then using that ID token as a Bearer authorization header. This n8n workflow template is essential for anyone running critical DevOps or secure data pipelines where proper authentication is paramount. By leveraging a dedicated n8n node for JWT signing, the process is both secure and highly repeatable across different projects.
This specific n8n workflow uses a manual n8n trigger for testing, but can be easily adapted to any time-based or incoming webhook n8n trigger.
serviceurl (the target Cloud Run API) and clientemail (from the Google Service Account key file).iss, aud (the token URI), and the targetaudience (the service URL) required by Google for validation.idtoken.id_token within the Bearer Authentication header. This robust n8n workflow ensures secure, automated access to private cloud APIs.To import and run this n8n workflow, follow these steps:
serviceurl and clientemail.privatekey block (including BEGIN/END headers) from your Google Service Account JSON file. Link this credential to the 'JWT' n8n node.{{$json.idtoken}}. This references the token retrieved in the previous step. Link this credential to the 'Cloud Run Request' n8n node. Execute (n8n trigger): Manual starting point for initiating this secure authentication n8n workflow.
Edit Fields (Set n8n node): Function: Stores critical configuration variables (serviceurl, clientemail). Key Configuration: Raw JSON output used to structure data for subsequent nodes.
JWT (n8n node): Function: Cryptographically signs the required JWT using the Service Account private key credential. This is a crucial step in the n8n template logic. Key Configuration: Uses expressions ({{ $json.clientemail }}) to dynamically populate claims (issuer, subject, audience, expiry) necessary for Google's validation.
Bearer Token Request (HTTP Request n8n node): Function: Exchanges the signed JWT assertion for an official Google ID token (Bearer token). Key Configuration: POST request to tokenuri with the content type set to form-urlencoded and the JWT dynamically inserted as the assertion body parameter.
id_token.Automate secure calls to Google Cloud Run services within your n8n workflow. This template uses service account tokens for authentication and manages complex iteration logic.

Secure your essential documents using this robust n8n workflow. It automatically captures Gmail attachments, uploads them to Google Drive, and sends an instant confirmation via WhatsApp.

Use this n8n workflow to securely ingest web form data, validate required fields, look up UTM parameters (Source, Medium, Campaign) in Odoo, and automatically create a qualified CRM lead. Deploy this reliable n8n template today.

Use this powerful n8n workflow to automate security reconnaissance. It leverages Google Dorks, scrapes sensitive links via AI Scraper (Parsera), and sends automated reports using an n8n Gmail node.

Automate robust PDF segmentation using Chunkr.ai and Google Gemini within this powerful n8n workflow. Generate structured JSON, HTML, and Markdown outputs, ideal for RAG and knowledge base pipelines. Download this n8n templates solution today.

Automate sophisticated RFM (Recency, Frequency, Monetary) analysis for your WooCommerce customers using this advanced n8n workflow. Segment users (Champions, At Risk) for targeted marketing campaigns with this ready-to-use n8n template.









































