chat-wait

Package Information

Released: 7/3/2025
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.3
Author: qixyuanmeng

Documentation

Banner image

n8n-nodes-chat-wait

A custom n8n node for implementing branch flow control and multi-turn conversations with context memory support.

Features

  • Branch Flow Control: Node can immediately output data from previous nodes while waiting for user input
  • Multi-turn Conversations: Support waiting for user input and continuing workflow
  • Context Memory: Automatically save and manage conversation history
  • Session Management: Support multi-user session isolation
  • Timeout Control: Configurable timeout for waiting user input
  • Webhook Integration: Receive user input through webhooks

Installation

npm install n8n-nodes-chat-wait

Usage

Basic Configuration

  1. Prompt Message: Set the message to display to users
  2. Timeout: Set timeout for waiting user input (seconds)
  3. Enable Context Memory: Turn on conversation history functionality
  4. Memory Storage Key: Set the key name for storing conversation history
  5. Session ID Field: Specify the field name for distinguishing user sessions

Output Ports

  • Continue: Immediately output data from previous nodes (if immediate output is enabled)
  • User Input: Output user input data and related context

Webhook Usage

The node automatically generates a webhook URL for receiving user input. POST request format:

{
  "chatWaitId": "generated wait ID",
  "userInput": "user input content",
  "sessionId": "session ID (optional)"
}

Conversation History Format

{
  "chatHistory": [
    {
      "type": "user",
      "message": "user message",
      "timestamp": "2025-07-03T10:00:00.000Z"
    }
  ]
}

Workflow Example

  1. Trigger NodeData ProcessingChat Wait Node
  2. Chat Wait node immediately outputs processed data to Continue port
  3. Simultaneously generates webhook waiting for user input
  4. User sends message to webhook through chat interface
  5. Node receives user input and outputs to User Input port
  6. Continue with subsequent workflow

Integration with Simple Memory

Can be used with Simple Memory and other memory nodes:

Previous Node → Chat Wait → Simple Memory → AI Processing → Chat Wait → ...

Prerequisites

You need the following installed on your development machine:

  • git
  • Node.js and npm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL here. For Windows users, refer to Microsoft's guide to Install NodeJS on Windows.
  • Install n8n with:
    npm install n8n -g
    
  • Recommended: follow n8n's guide to set up your development environment.

Using this starter

These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.

  1. Generate a new repository from this template repository.
  2. Clone your new repo:
    git clone https://github.com/<your organization>/<your-repo-name>.git
    
  3. Run npm i to install dependencies.
  4. Open the project in your editor.
  5. Browse the examples in /nodes and /credentials. Modify the examples, or replace them with your own nodes.
  6. Update the package.json to match your details.
  7. Run npm run lint to check for errors or npm run lintfix to automatically fix errors when possible.
  8. Test your node locally. Refer to Run your node locally for guidance.
  9. Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
  10. Update the LICENSE file to use your details.
  11. Publish your package to npm.

More information

Refer to our documentation on creating nodes for detailed information on building your own nodes.

License

MIT

Discussion