Block 1 - OpenAI Chat Model
- Type / Role
- @n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
- Config choices
- Version 1.2
This workflow is provided as-is. Please review and test before using in production.
How It Works This workflow creates an AI powered Telegram chatbot with session management , allowing users to: Start new conversations ( ). Check current sessions ( ). Resume past sessions ( ). Get...
@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.telegramtrigger, n8n-nodes-base.switch, n8n-nodes-base.googlesheets, n8n-nodes-base.telegram, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.chainsummarization
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.
Original n8n.io sourceThis workflow creates an AI-powered Telegram chatbot with session management, allowing users to:
/new). /current). /resume). /summary). /question).Key Components:
SESSION IDs and STATE). /new creates a session; /resume reactivates past ones.Simple Memory node). /question [query] fetches answers from session history).1. Multi-session Handling
Each user can create, manage, and switch between multiple sessions independently, perfect for organizing different conversations without confusion.
2. Persistent Memory
Conversations are stored in Google Sheets, ensuring that chat history and session states are preserved even if the server or n8n instance restarts.
3. Commands for Full Control
With intuitive commands like /new, /current, /resume, /summary, and /question, users can manage sessions easily without needing a web interface.
4. Smart Summarization and Q&A
Thanks to OpenAI models, the workflow can summarize entire conversations or answer specific questions about past discussions, saving time and improving the chatbot’s usability.
5. Easy Setup and Scalability
By using Google Sheets instead of a database, the workflow is easy to clone, modify, and deploy — ideal for quick prototyping or lightweight production uses.
6. Modular and Extensible
Each logical block (new session, get current session, resume, summarize, ask question) is modular, making it easy to extend the workflow with additional features like analytics, personalized greetings, or integrations with CRM systems.
Session (active/inactive sessions) and Database (chat logs).Telegram Integration:
Google Sheets Setup:
Session, Database) and column mappings match the template.OpenAI & Memory:
contextWindowLength in the Simple Memory node for conversation history length.Testing:
/new: Starts a session. /question [query]: Tests AI responses. /summary: Checks summarization.Deployment:
Contact me for consulting and support or add me on Linkedin.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 38 workflow blocks. Download the JSON for the full node graph.
| Workflow | Create a session-based Telegram chatbot with GPT-4o-mini and Google Sheets |
|---|---|
| Complexity | advanced |
| Nodes | 38 |
| Categories | Support Chatbot, AI Chatbot |
| Author | Davide |
| Published | 30 Apr 2025 |
Use the JSON export at /data/workflows/3798/3798.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
How It Works This workflow creates an AI powered Telegram chatbot with session management , allowing users to: Start new conversations ( ). Check current sessions ( ). Resume past sessions ( ). Get...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.