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

@qixyuanmeng/n8n-nodes-airouter

v0.1.0

Published

AI-powered routing node for n8n workflows

Readme

n8n-nodes-airouter

n8n.io - Workflow Automation

AI-powered routing node for n8n workflows. This node allows you to create intelligent branch routing based on AI analysis of input text, similar to intent classification nodes in Dify or Coze.

Installation
Features
Usage
Configuration
Examples
Compatibility
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

# Install from npm (when published)
npm install n8n-nodes-airouter

# Or install locally for development
npm install /path/to/n8n-nodes-airouter

Features

  • AI-Powered Routing: Uses connected Chat Models (OpenAI, Anthropic, etc.) to analyze input and route to appropriate branches
  • Dynamic Branch Creation: Support for any number of custom branches
  • Fallback Handling: Automatic fallback routing for unmatched inputs or errors
  • Flexible Input: Supports any text field from previous nodes
  • Rich Configuration: Customizable system prompts, branch descriptions, and keywords
  • Error Handling: Configurable error handling with fallback options
  • Confidence Scoring: Optional AI confidence metrics in output

Usage

Basic Setup

  1. Connect a Chat Model: Link any n8n AI Language Model (OpenAI, Anthropic, etc.) to the second input
  2. Configure Input Text: Set the text field to analyze (default: {{$json.text || $json.message || $json.content}})
  3. Define Branches: Add branches with names and descriptions
  4. Connect Outputs: Connect each branch output to different workflow paths

Node Inputs

  • Main Input: The data flow containing text to analyze
  • Chat Model: Any n8n AI Language Model connection

Node Outputs

  • Branch Outputs: One output for each configured branch
  • Fallback Output: Default output for unmatched inputs or errors

Configuration

Input Text

The text field to analyze for routing decisions. Supports n8n expressions.

System Prompt

Customize the AI's instructions. The default prompt guides the AI to return exact branch names.

Branches

Configure routing branches with:

  • Branch Name: Used as output connection name and routing target
  • Description: Helps AI understand when to use this branch
  • Keywords: Optional comma-separated keywords for additional context

Options

  • Temperature: Controls AI randomness (0-2, default: 0.1)
  • Max Tokens: Maximum AI response length (default: 50)
  • Include Confidence: Add AI usage metrics to output
  • Fallback on Error: Route to fallback on AI failures (default: true)

Examples

Customer Support Routing

Branches:
- Name: "question"
  Description: "User is asking a question about products or services"
  Keywords: "what, how, when, where, why, question"

- Name: "complaint"
  Description: "User is expressing dissatisfaction or reporting issues"
  Keywords: "problem, issue, broken, not working, upset"

- Name: "request"
  Description: "User is requesting something specific or asking for help"
  Keywords: "please, can you, I need, help me"

Content Classification

Branches:
- Name: "technical"
  Description: "Technical documentation or programming content"
  Keywords: "code, API, programming, technical, development"

- Name: "marketing"
  Description: "Marketing, sales, or promotional content"
  Keywords: "sale, promotion, marketing, campaign, buy"

- Name: "support"
  Description: "Customer support or help documentation"
  Keywords: "help, support, tutorial, guide, how-to"

Output Data

Each output includes:

{
  "selectedBranch": "question",
  "aiDecision": "question",
  "inputText": "How does this product work?",
  "routingReason": "Matched branch: question",
  // ... original input data
}

Compatibility

  • Tested against n8n version 1.0+
  • Requires n8n AI Language Model connections
  • Compatible with OpenAI, Anthropic, and other supported AI providers

Development

To test the node locally:

# Clone the repository
git clone https://github.com/QixYuanmeng/n8n-nodes-airouter.git
cd n8n-nodes-airouter

# Install dependencies
pnpm install

# Build the node
pnpm run build

# Link for local testing
npm link
cd /path/to/your/n8n/installation
npm link n8n-nodes-airouter

Resources

License

MIT