AI Chatbot with Long-Term Memory & Note Storage for Telegram

n8n AI Content Creation Messaging

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

This workflow template creates an AI agent chatbot with long-term memory and note storage using Google Docs and Telegram integration.

Google Docs Integration

- n8n Google Docs Node Setup

- Google Credentials

Telegram Integration

- Telegram Setup

Core Features

- AI Agent Integration

Implements a sophisticated AI agent with memory management capabilities.

Uses GPT-4o-mini and DeepSeek models for intelligent conversation handling.

Maintains context awareness through session management.

- Memory System

Long-term memory storage using Google Docs.

Separate note storage system for specific information.

Window buffer memory for maintaining conversation context.

Intelligent memory retrieval and storage mechanisms.

- Communication Interface

Telegram integration for message handling.

Real-time message processing and response generation.

Technical Components

- Memory Architecture

Dual storage system separating memories from notes.

Automated memory retrieval before each interaction.

Structured memory saving with timestamps.

- AI Models

Primary GPT-4o-mini mini model for general interactions.

DeepSeek-V3 Chat for specialized processing.

Custom agent system with tool integration.

- Storage Integration

Google Docs integration for persistent storage.

Separate document management for memories and notes.

Automated document updates and retrievals.

Tools used: Google Docs, Telegram

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.