Create a Session-Based Telegram Chatbot with GPT-4o-mini and Google Sheets
n8n template #3798Summary
Use templateHow It Works This workflow creates an AI-powered Telegram chatbot with session management, allowing users to: Start new conversations (/new). Check current sessions (/current). Resume past sessions (/resume). Get summaries (/summary). Ask questions (/question). Key Components: Session Management: Uses Google Sheets to track active/expired sessions (storing SESSION IDs and STATE). /new creates a session; /resume reactivates past ones. AI Processing: OpenAI GPT-4 generates responses with contextual memory (via Simple Memory node). Summarization: Condenses past conversations when requested. Data Logging: All interactions (prompts/responses) are saved to Google Sheets for audit and retrieval. Us
How to set it up
- Open template #3798 on n8n.io and click Use for free, or copy the template JSON and paste it onto an empty canvas in n8n.
- Create 3 credentials under Credentials → Add credential: Google Sheets, Telegram, OpenAI Chat Model. Then open each of those nodes and pick the credential.
- Check the model in the AI Agent node. The template may point at a model your account can't use; swap it for one you have access to.
- Click Execute workflow and step through each node's output to confirm the data looks right.
- Toggle the workflow to Active so its trigger runs on its own.
Hand off to your agent
Prompt
Help me set up the n8n workflow "Create a Session-Based Telegram Chatbot with GPT-4o-mini and Google Sheets" (https://n8n.io/workflows/3798). It uses: Google Sheets, Telegram, Code, AI Agent, Summarization Chain, Basic LLM Chain, OpenAI Chat Model, Simple Memory. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Questions
Yes. Davide Boizza published it free on n8n.io as a verified creator, and it has 10K views. It runs on n8n Cloud or a self-hosted n8n instance.
Google Sheets, Telegram, OpenAI Chat Model. The other 5 nodes are built into n8n.
Similar workflows
NameViews
- Explore n8n Nodes in a Visual Reference Library5,197
- AI Email Analyzer: Process PDFs, Images & Save to Google Drive + Telegram21K
- Automate SEO blog content creation with GPT-4, Perplexity AI and WordPress6,949
- Automate SEO blog creation + social media with GPT-4, Perplexity and WordPress5,798
- Automated Research Report Generation with AI, Wiki, Search & Gmail/Telegram4,632
- ✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition55K
- Automate Product Training & Customer Support via WhatsApp, GPT-4 & Google Sheets32K
- 🧠 Empower Your AI Chatbot with Long-Term Memory and Dynamic Tool Routing29K