Skip to main content

Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG

Workflow preview

Workflow preview
100%
Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Your AI secretary that self learning every day and remembers everything you said (text, audio, image). Imagine having a personal AI secretary accessible right from your Telegram, ready to assist yo...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.openai, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.telegram, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Tianyi.

Original n8n.io source

1.1 Workflow description

Title
Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG
Workflow name
Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG

Your AI secretary that self-learning every day and remembers everything you said (text, audio, image).

Imagine having a personal AI secretary accessible right from your Telegram, ready to assist you with information and remember everything you discuss. This n8n workflow transforms Telegram into your intelligent assistant, capable of understanding text, audio, and images, and continuously learning from your interactions. It integrates RAG's offline data ingestion and online querying functionalities, letting you save inspiration and key information permanently in real-time, and giving you an AI assistant that remembers all your dialogues and information. It builds and queries a powerful vector database in real-time, ensuring relevant and accurate responses. Video guidance on how to set up Telegram integration is also included.

Who is this for?

This template is ideal for:

  • Individuals seeking a personal AI assistant for quick information retrieval and note-taking.
  • Professionals who need to keep track of important conversations and insights.
  • Anyone interested in leveraging the power of Retrieval-Augmented Generation (RAG) and vector databases for personal knowledge management.
  • Users who want a self-learning AI that improves over time based on their interactions.

What problem is this workflow solving?

This workflow integrates RAG's offline data ingestion and online querying functionalities, letting you save inspiration and key information permanently in real-time, and giving you an AI assistant that remembers all your dialogues and information. This workflow addresses the challenge of information overload and the need for an easily accessible, personalized knowledge base. It eliminates the need to manually organize notes and search through past conversations. By automatically storing and retrieving information from a vector database, this workflow makes it effortless to access the knowledge you need, when you need it. It also provides a way to retain information from various media types like voice notes and images.

What this workflow does:

This workflow automates the following steps:

  • Instant Information Capture: Receives text messages, audio notes (transcribed), and images (with content analysis) directly from your Telegram.
  • Intelligent Question Answering: When you ask a question, the AI searches its knowledge base (Pinecone vector store) for relevant information and provides a comprehensive answer. It even considers your recent conversations for context.
  • Automatic Knowledge Storage: When you make a statement or provide information, the AI extracts key details and saves them in a Google Docs "memory palace."
  • Daily Self-Learning: Every day, the workflow automatically takes all the information stored in the Google Docs, converts it into a vector representation, and adds it to its knowledge base (Pinecone vector store). This ensures the AI continuously learns and remembers everything you've shared.
  • Image Understanding: Extracts text and information from images you send.
  • Audio Transcription: Automatically transcribes your voice notes into text for processing and storage.
  • Short-Term Memory: Remembers recent interactions within a session for more context-aware conversations.

Setup:

To get started, you'll need to connect the following services to your n8n instance:

  1. Telegram: Connect your Telegram bot API credentials. A video guidance is included for telegram integration setup.
  2. OpenAI: Provide your OpenAI API key for audio transcription and image analysis.
  3. Pinecone: Set up a Pinecone account and provide your API key and environment. Create a namespace in Pinecone.
  4. Google Docs: Connect your Google account with access to Google Docs. You'll need to create a Google Doc that will serve as the daily "memory palace" and provide its ID in the workflow.

How to customize this workflow:

  • Adjust the AI Agent's Personality: Modify the system prompt in the "AI Agent" node to tailor the AI's tone and behavior.
  • Expand Knowledge Sources: Integrate other data sources into the daily learning process, such as emails or other documents, by adding more nodes to the scheduled trigger workflow.
  • Add More Tools for the AI Agent: Integrate additional tools into the AI Agent, such as web search or other APIs, to further enhance its capabilities.
  • Modify the Daily Schedule: Adjust the schedule trigger to run at a different time or interval.

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 2 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 3 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 4 - OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 5 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 6 - Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 7 - Edit Fields_Audio

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Edit Fields_Image

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Edit Fields_Text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 11 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 12 - Google Docs

Type / Role
n8n-nodes-base.googleDocsTool - googleDocsTool
Config choices
Version 2

Block 13 - Pinecone Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1

Block 14 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 15 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 16 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 17 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 18 - Google Docs1

Type / Role
n8n-nodes-base.googleDocs - googleDocs
Config choices
Version 2

Block 19 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Google Docs2

Type / Role
n8n-nodes-base.googleDocs - googleDocs
Config choices
Version 2

Block 21 - Deepseek

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 22 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 24 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 42 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG
Complexity advanced
Nodes 42
Categories Personal Productivity, AI Chatbot
Author Tianyi
Published 16 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3183/3183.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Self-learning AI assistant with permanent memory | GPT,Telegram & Pinecone RAG do?

Your AI secretary that self learning every day and remembers everything you said (text, audio, image). Imagine having a personal AI secretary accessible right from your Telegram, ready to assist yo...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 Personal Productivity, AI Chatbot use case.