Setting the chat's name in the Chat Hub

How can I set the Chat’s name/title when using a workflow agent in the Chat Hub?

Using the personal agent, the name of the chat is automatically generated with AI. I’d like to have the same effect with the workflow agents (instead of the default “New Chat”)

Information on your n8n setup

  • Debug info

    core

    • n8nVersion: 2.4.8
    • platform: docker (self-hosted)
    • nodeJsVersion: 22.21.1
    • nodeEnv: production
    • database: postgres
    • executionMode: regular
    • concurrency: -1
    • license: enterprise (production)

Hi @Zohar

Currently, Chat Hub does not allow you to define or automatically generate titles for chats created by workflow agents.

The safest recommendation today is to generate the title with AI within the workflow itself, using the first message as context, and store that title externally (e.g., Postgres, Notion, etc.).

This solves the need for organization and history without depending on features not exposed by the Hub.

General Idea
  1. Use the Chat Trigger as chat input
  1. Capture only the first message of the conversation
  • You can use a logic node (e.g., IF / Switch / Function) to detect if it’s the first message of the session.
  • The documentation shows that the Chat Trigger can load previous sessions via memory, so you can use a Memory node (e.g., Window Buffer Memory) connected to the Chat Trigger and Agent to know if there are previous messages. Node options; AI chatbot guide
  1. Generate the title with AI using the first message as context
  • Use an AI Agent or a Basic LLM Chain to generate a short title from the first message.
  • The pattern is to pass the user’s text as a prompt (e.g., {{ $json.message.text }} in flows with Telegram, but the same concept applies to Chat Trigger). AI agent tutorial; Agentic workflows
  • You can structure the prompt similar to the “generate title” example used for support tickets, adapting it for “conversation title”: Support tickets AI

Example instruction (in a Basic LLM Chain):

User message: "{{ $json.message }}"
Generate ONLY a short title (max 8 words) summarizing the conversation topic.
  1. Save the title externally (Postgres, Notion, etc.)
  • After the AI node returns the title, connect a database node (Postgres, MySQL, etc.) or a Notion node and do an INSERT with:
    • Session / user ID (from Chat Trigger)
    • Generated title
    • (Optional) timestamp, first message, etc.
  • The documentation doesn’t provide a ready example of “saving chat title,” but it shows the pattern of using AI to generate structured fields (title, summary, priority) and then using them in other nodes — the same approach applies here. Support tickets AI
  1. (Optional) Reuse the title later
  • In future executions of the same session, you can fetch the saved title (via Postgres/Notion) using the session ID from Chat Trigger and display it in your own UI or another system.
  • The Chat Hub documentation doesn’t describe a way to “inject” this title into the native Chat Hub interface, so this will likely stay outside the default UI. Chat Hub

Thanks @tamy.santos

Yes, I know how to summarize the message, but I was wondering about using the chat hub’s UI.
It would be a significant improvement to UX if the chat history had titles for all chats, not only for the “internal” ones.

I can think of a number of possible UI approaches to “how to set a chat title” (e.g., an option in the chat trigger’s node or in the attached AI agent node) but I guess n8n’s team would know better :slight_smile:

@Zohar

you’re welcome!

In this case, to move forward, you’d need to post it as a feature request on the n8n community forum or GitHub.