conditional-message

N8N Community Node - Conditional Message Node combining If, Switch and Notice functionality

Package Information

Downloads: 2 weekly / 145 monthly
Latest Version: 2.0.0
Author: [name]

Documentation

N8N Conditional Message Node

A custom node for N8N that evaluates conditions and displays custom messages with intelligent routing.

Features

🔀 Conditional Operation

  • Conditional Message: Evaluates multiple conditions with AND/OR operators and displays custom messages

📋 Supported Operators

  • Equal / Not Equal
  • Contains / Not Contains
  • Starts With / Ends With
  • Greater Than / Less Than
  • Greater Than or Equal / Less Than or Equal
  • Is Empty / Is Not Empty
  • Filter (multiple words separated by comma)
  • Select (always returns false, used as placeholder)

💬 Per-Condition Message System

  • Each condition has its own message configuration
  • Customizable title and body per condition
  • Types: Info, Success, Warning, Error
  • Individual control to show or hide message per condition
  • Automatic timestamp

🛤️ Intelligent Routing

  • True/False outputs
  • Preserved data with detailed information from all conditions
  • Condition combination with AND/OR

Installation

npm install n8n-nodes-conditional-message

How to Use

  1. Add Conditions: Define up to 2 conditions with Value 1, Operator and Value 2 (or Filter)
  2. Configure Messages: For each condition, define title, body and message type (optional)
  3. Combine Conditions: Choose AND (all must be true) or OR (at least one must be true)
  4. Routing: Data is routed to True or False output based on result

⚠️ Limitations

  • Maximum of 2 conditions per node
  • Original data always preserved and passed to next nodes

Output Example

{
  "originalData": "...",
  "conditionalMessage": {
    "overallResult": true,
    "messages": [
      {
        "title": "Status Validation",
        "body": "Status is active",
        "type": "success",
        "conditionIndex": 0,
        "conditionMet": true
      },
      {
        "title": "Age Verification",
        "body": "Age is in valid range",
        "type": "info",
        "conditionIndex": 1,
        "conditionMet": true
      }
    ],
    "totalConditions": 2,
    "metConditions": 2,
    "combineOperation": "and",
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Development

# Install dependencies
npm install

# Build project
npm run build

# Development with watch
npm run dev

# Lint
npm run lint

License

MIT

Discussion