Automatic Google Cloud Run Auth with JWT Token Management (sub-workflow) - n8n Workflow | Neura Market

    Automatic Google Cloud Run Auth with JWT Token Management (sub-workflow)

    ## Who it's for? Anyone calling a **Google Cloud Run** service from n8n who wants a small, reusable auth layer instead of wiring tokens in every workflow. ## What it does / How it works This sub-workflow checks whether an incoming `id_token` exists and is still valid (with a 5-minute buffer). If it's good, it reuses it. If not, it signs a short-lived JWT with your service account, exchanges it at Google's token endpoint, and returns a fresh `id_token`. It also passes through `service_url` and an optional `service_path` so the caller can hit the endpoint right away. (Designed to be called via **Execute Workflow** from your main flow.) ## How to set up - Add your **JWT (PEM)** credential using the service account **private_key**. - In **Vars**, set `client_email` (from your key) and confirm `token_uri` is `https://oauth2.googleapis.com/token`. - Call this sub-workflow with `service_url` (and optional `service_path`). Optionally include a prior `id_token` to enable reuse. ## Inputs / Outputs **Inputs:** `id_token` (optional), `service_url`, `service_path` **Outputs:** `id_token`, `service_url`, `service_path` ## Notes - Built for loops: pair with a Merge/Split strategy to attach `id_token` to each item. - Keep credentials in n8n **Credentials** (no keys in nodes). - Full write-up and context: **[Build a Secure Google Cloud Run API, Then Call It from n8n (Free Tier)](https://medium.com/@marcocodes/build-a-secure-google-cloud-run-api-then-call-it-from-n8n-88c03291a95f)** - by Marco Cassar

    Platform
    n8n
    Category
    IT & Development
    Price
    Free
    Creator
    Marco Cassar
    • if
    • jwt
    • set
    • merge
    • stickyNote
    • httpRequest
    • executeWorkflowTrigger
    Back to MarketplaceMore n8n Workflows

    How to import this workflow into n8n

    1. 1Purchase or download the workflow to get the n8n workflow JSON file.
    2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
    3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
    4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

    Related IT & Development workflows

    • Create daily historical AI videos with Gemini, fal.ai, Telegram and YouTubeFree
    Advanced multi-agent AI personal assistant with 250+ task capabilities (WhatsApp + GPT)
    Free
  1. Send Organized Security CVE Digests from NVD with AI-Polished Summaries to GmailFree
  2. Learn n8n basics in 3 easy steps ✨Free
  3. Automated multi-platform sales agent with RAG, CRM & payment processingFree
  4. Automate URL Monitoring with Downtime Alerts via EmailFree
  5. All IT & Development workflows →All n8n workflows →

    Need help customizing this workflow?

    Our automation experts adapt it to your exact stack, data, and process — or build one from scratch.

    Get a Custom Build
    Neura Market
    Neura Market
    Marketplace
    Directories
    Resources

    Marketplace

    • Prompts
    • Workflows
    • Agents Store
    • Workflow Packs
    • Categories
    • Marketplace

    Directories

    • AI Tools Directory
    • ChatGPT
    • Claude
    • Gemini
    • Cursor
    • Grok
    • DeepSeek
    • Perplexity
    • CoPilot
    • Midjourney
    • Stable Diffusion
    • MCP Servers
    • .md Directory
    • All Directories

    Free Tools

    • AI Text Humanizer
    • AI Content Detector
    • Workflow Generator
    • Model Comparison
    • AI Pricing Calculator
    • AI Benchmarks
    • ROI Calculator
    • All Free Tools

    Resources

    • AI News
    • Blog
    • AI Models
    • Integrations
    • Alternatives
    • n8n vs Zapier
    • Make vs Zapier
    • n8n vs Make
    • Resource Library
    • Documentation

    Community

    • AI Jobs
    • AI Events
    • AI Companies
    • Start Selling
    • Sell n8n Workflows
    • Sell AI Agents
    • Sell Prompts
    • Creator Guide
    • Advertise
    • Affiliates

    Company

    • About
    • Contact
    • Help
    • Careers
    • Pricing
    • Terms
    • Privacy
    • License
    • DMCA

    Stay Updated

    Get the latest AI tools and insights delivered to your inbox.

    Neura Market Logoneuramarket

    © 2026 Neura Market. All rights reserved.