Skip to main content

Securely call private Google Cloud Run APIs with JWT authentication (simplified)

Workflow preview

Workflow preview
100%
Securely call private Google Cloud Run APIs with JWT authentication (simplified) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 Min...

Best for

  • DevOps automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.jwt, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Marco Cassar.

Original n8n.io source

1.1 Workflow description

Title
Securely call private Google Cloud Run APIs with JWT authentication (simplified)
Workflow name
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: SetJWT (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:

  1. Create a Cloud Run service and enable Require authentication (Cloud IAM).
  2. Create a Google Service Account with Cloud Run Invoker on that service.
  3. In n8n, set service_url, client_email, token_uri (https://oauth2.googleapis.com/token) in Set.
  4. Create a JWT (PEM) credential from your service account key (paste the full BEGIN/END block).
  5. 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)

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - JWT

Type / Role
n8n-nodes-base.jwt - jwt
Config choices
Version 1

Block 2 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Cloud Run Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Bearer YOUR_TOKEN_HERE Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Execute

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Securely call private Google Cloud Run APIs with JWT authentication (simplified)
Complexity intermediate
Nodes 10
Categories DevOps, Multimodal AI
Author Marco Cassar
Published 19 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7571/7571.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Securely call private Google Cloud Run APIs with JWT authentication (simplified) do?

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 Min...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, Multimodal AI use case.