Securely Call Private Google Cloud Run APIs with JWT Authentication (Simplified)
Who it’s for? Anyone who wants a dead-simple, free-tier friendly way to run custom API logic on Google Cloud Run and call it securely from n8n—no public exposure, no local hosting.
What it does Minimal flow: Set → JWT (sign) → HTTP (token exchange) → HTTP (call Cloud Run with Authorization: Bearer <id_token> ). No caching, no extras—just enough to authenticate and hit your endpoint.
How to set up General instructions below—see my detailed guide for more info:
Build a Secure Google Cloud Run API, Then Call It from n8n (Free Tier)
Setup:
Create a Cloud Run service and enable Require authentication (Cloud IAM).
Create a Google Service Account with Cloud Run Invoker on that service.
In n8n, set service_url, client_email, token_uri (https://oauth2.googleapis.com/token) in Set.
Create a JWT (PEM) credential from your service account key (paste the full BEGIN/END block).
Run the workflow; the second HTTP node calls your Cloud Run URL with the ID token.
Requirements
Cloud Run service URL (auth required)
Google Service Account with Cloud Run Invoker
Private key JSON fields downloaded from Service Account | needed to generate JWT credentials
More details Full write-up (minimal + modular versions):
Build a Secure Google Cloud Run API, Then Call It from n8n (Free Tier)
Related Templates
AI Agent: Scrape, Summarize & Save Articles to Notion (Gemini, Browserless)
This n8n workflow automates the process of saving web articles or links shared in a chat conversation directly into a No...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Send structured logs to BetterStack from any workflow using HTTP Request
Send structured logs to BetterStack from any workflow using HTTP Request Who is this for? This workflow is perfect for...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments