Skip to main content

n8n enterprise AI security firewall — guardrails for secure agents

Workflow preview

Workflow preview
100%
n8n enterprise AI security firewall — guardrails for secure agents preview
Open on n8n.io

Important notice

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

1. Workflow Overview

️ n8n Guardrails: Risk Ranking This workflow provides a complete testing rig for evaluating text against seven essential AI guardrails used in production systems. It helps you detect jailbreak at...

Best for

  • SecOps automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.guardrails, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.googlesheets, n8n-nodes-base.switch, n8n-nodes-base.set, 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 Sandeep Patharkar | www.FastTrackAiMastery.com.

Original n8n.io source

1.1 Workflow description

Title
n8n enterprise AI security firewall — guardrails for secure agents
Workflow name
n8n enterprise AI security firewall — guardrails for secure agents

🛡️ n8n Guardrails: Risk Ranking

This workflow provides a complete testing rig for evaluating text against seven essential AI guardrails used in production systems.
It helps you detect jailbreak attempts, PII exposure, NSFW content, secret key leaks, malicious URLs, topical misalignment, and keyword violations.
Use the included Google Sheet or CSV to batch-test multiple inputs instantly.


## How It Works (Internal Workflow Overview)

1. Load Input Rows

The workflow reads each test entry (Guardrail_Type + Input_Text) from a Google Sheet or CSV.

2. Route to the Correct Guardrail

A Switch node sends the text to the appropriate guardrail:

  • Jailbreak
  • PII
  • Secret Keys
  • NSFW
  • URLs
  • Topical Alignment
  • Keywords

3. AI Guardrail Evaluation

Each guardrail uses Google Gemini to return:

  • Pass / Fail
  • Confidence score
  • Reasoning
  • Extracted PII, URLs, or entities (when relevant)

4. Optional Sanitization Layer

Three sanitizers demonstrate how to clean unsafe text:

  • PII Sanitization
  • Secret Key Sanitization
  • URL Sanitization

5. Review Results

Each guardrail node outputs clean JSON, making debugging fast and transparent.


## How to Set Up

1. Load the Test Dataset

Use either:

  • The included CSV file
  • The linked Google Sheet

Update only:

  • Document ID
  • Sheet name

2. Add Google Sheets Credentials

Create an OAuth2 credential → paste the Google JSON → connect your account.


3. Add Google Gemini Credential

Go to Credentials → Google Gemini (PaLM API)
Paste your API key → attach it to all Guardrail nodes.


4. Review Sticky Notes

They visually explain:

  • What each guardrail checks
  • Why the check is important
  • Risk scoring and impact

5. Run the Workflow

Click Execute Workflow and inspect:

  • Each guardrail node’s output
  • The full execution data

## Requirements

  • n8n (latest version recommended)
  • Google Gemini API key
  • Google Sheets API access
  • Test dataset: n8n Guardrails test data.csv

## Test Data Included

The included dataset allows instant testing:

  • Jailbreak prompts
  • PII samples
  • API key leaks
  • NSFW text
  • Malicious URL examples
  • Off-topic content
  • Keyword triggers

## Template Metadata

Template Author: Sandeep Patharkar
Category: AI Safety / Agent Security
Difficulty: Intermediate
Estimated Setup Time: 10–15 minutes
Tags: Guardrails, AI Agents, Safety, Enterprise


## Connect With Me

Author: Sandeep Patharkar**
🔗 LinkedIn: https://www.linkedin.com/in/sandeeppatharkar
🏠 Skool AIC+: https://www.skool.com/aic-plus

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Keywords

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 4 - Jailbreak

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 5 - Sticky Note2

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

Block 6 - Sticky Note3

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

Block 7 - NSFW

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 8 - Sticky Note4

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

Block 9 - PII

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 10 - Sticky Note5

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

Block 11 - Secret Keys

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 12 - Sticky Note6

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

Block 13 - Topical Alignment

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 14 - Sticky Note7

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

Block 15 - URLs

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 16 - Sticky Note9

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

Block 17 - Sticky Note10

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

Block 18 - Sanitize PII

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 19 - Sticky Note11

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

Block 20 - Sanitize Keys

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 21 - Sticky Note12

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

Block 22 - Sanitize URLs

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 23 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 24 - Guadrails Test Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow n8n enterprise AI security firewall — guardrails for secure agents
Complexity advanced
Nodes 32
Categories SecOps, AI Summarization
Author Sandeep Patharkar | www.FastTrackAiMastery.com
Published 19 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11025/11025.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 n8n enterprise AI security firewall — guardrails for secure agents do?

️ n8n Guardrails: Risk Ranking This workflow provides a complete testing rig for evaluating text against seven essential AI guardrails used in production systems. It helps you detect jailbreak at...

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 SecOps, AI Summarization use case.