Sparround

Chat Trigger and memory

The Chat Trigger opens a chat interface inside n8n itself: you can start a workflow through chat and see its answer in the same window. It is the fastest way to test an AI agent while building — you see how it behaves without setting up Telegram or Slack.

Memory keeps the conversation's earlier messages. Without it every message starts from zero: when the user asks "and how much does it cost?", the model does not know what "it" refers to.

The simplest option in n8n is Simple Memory, which stores a configurable number of messages for the current session. For more durable memory there are nodes backed by external services, such as Postgres Chat Memory and Redis Chat Memory.

An important limitation: memory works only with agent nodes. Chain nodes do not support it — if you need conversation, you need an agent.

Memory optionWhere it is storedWhen to choose it
Simple MemoryIn the n8n instance's memory, for the current sessionGetting started, testing, short conversations
Postgres Chat MemoryIn a Postgres databaseWhen the conversation must survive a restart
Redis Chat MemoryIn RedisWhen speed matters and there are many concurrent sessions
Chat Memory ManagerAn extra node that manages memoryFor controlling memory size or injecting synthetic messages

The session key is the most important setting. Memory is partitioned per session. Getting the key wrong causes one of two problems:

  • The same key for everyone — every user sees everyone else's conversation. That is a serious privacy failure.
  • A new key per message — memory effectively does nothing, because each message counts as a new session.

The right key is a stable value identifying the user: the chat ID in Telegram, the user ID in Slack, your own user identifier in your own system.

Memory size directly affects cost. Every stored message is sent to the model on the next request. A 50-message memory means paying for 50 messages' tokens on every question. The practical approach is to pick a limit matched to what the conversation actually needs, and to consider replacing the older part with a summary in long conversations.

The Chat Trigger can also work with a streamed response — the answer appears progressively as it is generated. For long answers that markedly improves the experience, because nobody stares at a blank screen for 15 seconds. The Webhook node has a corresponding response mode too.

📚 Sources and documentation