Skip to content
AI Agents

Process Chat Messages with Intelligent Agent and Batch Splitting

13 nodes 558 169 Automatic trigger
Download

Loading workflow…

Workflow Description

A workflow that captures incoming chat messages, routes them to an AI agent powered by an advanced language model, splits responses into manageable batches, and maintains conversation context using memory buffers for continuous interaction.

How it works

  1. 1.Receive incoming message from the chat interface trigger
  2. 2.Route message to the AI agent backed by OpenRouter language model
  3. 3.Split the agent response into separate processing batches
  4. 4.Store conversation context in memory buffer for recall
  5. 5.Apply conditional logic to direct workflow based on response type

Use cases

  • Build a context-aware chatbot that remembers conversation history
  • Handle high-volume customer queries by processing them in parallel batches
  • Automate responses to frequently asked questions with continuous learning

Requirements

  • Valid OpenRouter API key configured
  • Chat interface compatible with n8n
  • Sufficient memory allocation for storing conversation history

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Chat Trigger AI Agent Split In Batches Code Memory Set If Lm Chat Open Router

Details

Trigger Automatic trigger
Nodes 13
Apps 8
Views 558
Downloads 169

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (13)

/

When chat message received

Chat Trigger

#1

AI Agent

Agent

#2

Loop Over Items

Split In Batches

#3

Extract mentions

Code

#4

Simple Memory

Memory Buffer Window

#5

Set last Assistant message as input

Set

#6

Set user message as input

Set

#7

First loop?

If

#8

Set lastAssistantMessage

Set

#9

Combine and format responses

Code

#10

Define Global Settings

Code

#11

Define Agent Settings

Code

#12

Sticky Note

Sticky Note

#13

Sticky Note1

Sticky Note

#14

Sticky Note2

Sticky Note

#15

Sticky Note3

Sticky Note

#16

Sticky Note4

Sticky Note

#17

OpenRouter Chat Model

Lm Chat Open Router

#18
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime