npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-railguard

v1.0.0

Published

n8n node for RailGuard AI Guardrails

Downloads

18

Readme

n8n-nodes-railguard

This is an n8n community node that lets you use RailGuard AI Guardrails in your n8n workflows.

RailGuard provides enterprise-grade AI safety and compliance guardrails for LLM applications. Validate user inputs, AI outputs, and prevent prompt injection, data leaks, and policy violations.

n8n is a fair-code licensed workflow automation platform.

Installation

Follow the installation guide in the n8n community nodes documentation.

Community Nodes (n8n Cloud & Self-Hosted)

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-railguard in the Enter npm package name field
  4. Click Install

Manual Installation (Self-Hosted)

cd ~/.n8n/nodes
npm install n8n-nodes-railguard

Then restart n8n.

Operations

Validate

Validate user input and/or AI output against your configured rules.

Parameters:

  • Agent ID (required): Your RailGuard agent ID
  • Input (required): The user input to validate
  • Output (optional): The AI-generated output to validate
  • Metadata (optional): Additional JSON metadata

Returns:

{
  "decision": "allow|block|warn|rewrite",
  "reason": "Explanation of the decision",
  "rule": {
    "id": "rule-id",
    "name": "Rule Name"
  },
  "rewrite": "Rewritten text (if decision is rewrite)"
}

Get Rules

Retrieve all rules configured for an agent.

Parameters:

  • Agent ID (required): Your RailGuard agent ID

Returns: Array of rule objects

Get Validations

Get validation history for an agent.

Parameters:

  • Agent ID (required): Your RailGuard agent ID
  • Limit (optional): Number of validations to return (1-200, default: 50)

Returns: Array of validation records

Credentials

This node requires RailGuard API credentials:

  1. API Key: Your RailGuard API key (starts with rg_)
  2. Base URL: Your RailGuard API URL (default: https://api.railguard.io)

Getting Your API Key

  1. Sign up at RailGuard
  2. Go to Dashboard > API Keys
  3. Create a new API key
  4. Copy the key (it will only be shown once)

Usage Examples

Example 1: Validate User Input Before Sending to AI

Webhook → RailGuard (Validate) → IF (decision = allow) → OpenAI → Respond
                                  ↓
                              (decision = block) → Return Error

RailGuard Node Config:

  • Operation: Validate
  • Agent ID: chatbot-prod
  • Input: {{ $json.userMessage }}

Example 2: Validate AI Output Before Returning to User

Webhook → OpenAI → RailGuard (Validate) → IF (decision = allow) → Return Response
                                          ↓
                                      (decision = block) → Return Safe Message

RailGuard Node Config:

  • Operation: Validate
  • Agent ID: chatbot-prod
  • Input: {{ $json.userInput }}
  • Output: {{ $json.aiResponse }}

Example 3: Monitor and Log Warnings

Webhook → RailGuard (Validate) → IF (decision = warn) → Log to Database
                                  ↓
                              Continue Normal Flow

Use Cases

  • 🛡️ Prevent Prompt Injection: Block malicious attempts to manipulate AI behavior
  • 🔒 Data Loss Prevention: Detect and prevent sensitive data leaks in AI outputs
  • 📋 Compliance: Ensure AI responses comply with policies (PII, GDPR, HIPAA)
  • ⚠️ Content Moderation: Filter toxic, offensive, or inappropriate content
  • 🎯 Custom Rules: Define custom patterns and business logic rules

Resources

Support

For issues or questions:

License

MIT