Templates / Automatic Google Cloud Run auth with JWT token management (sub-workflow)

Automatic Google Cloud Run auth with JWT token management (sub-workflow)

Ready for 3.0

by Marco Cassar ✓ · 504 views · created 2025-08-19 · Engineering, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 10 nodes and runs when another workflow calls it. Along the way it connects JWT.

How it runs

Trigger: When another workflow calls it.

  1. Combine Context (Merge): merges the data from its input branches
  2. Vars (Edit Fields (Set)): sets or maps fields
  3. If: checks a condition and branches into true / false
  4. Decode JWT (JWT): decode
  5. Sign New JWT (JWT): uses JWT
  6. If: checks a condition and branches into true / false
  7. Bearer YOUR_TOKEN_HERE Request (HTTP Request): calls an HTTP API (POST)
  8. Raise Id (Edit Fields (Set)): sets 1 field: id_token
  9. Return Values (Edit Fields (Set)): sets 3 fields: id_token, service_url, service_path

Services it uses

JWT

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (6)

From the author

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 idtoken exists and is still valid…

Excerpt from Marco Cassar's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.