Give the AI agent a long-term memory tool router
Workflow Description
A template that equips an AI agent with a long-term memory tool router, enabling it to store and retrieve information across multiple sessions. It integrates with Gmail, Twitter, Telegram, and Google Docs for efficient data management and contextual processing.
How it works
- 1.Activate the AI agent through a chat trigger to receive user commands and inquiries
- 2.Route requests to the buffered memory tool to retrieve previous context and stored information
- 3.Execute advanced language chains to process requests based on the retrieved memory context
- 4.Integrate with Gmail, Twitter, Telegram, and Google Docs to automatically save results and responses
- 5.Use Google Docs as a long-term repository for critical information and project references
Use cases
- Customer support agent that remembers interaction history and previous solutions for faster resolution
- Research assistant that collects and organizes information across multiple platforms automatically
- Task management system that links instructions to historical project context and requirements
Requirements
- Active OpenAI account with valid API key
- Enabled accounts on Gmail, Twitter, Telegram, and Google Docs
- Sufficient permissions to read and write data across all integrated applications
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (39)
When Executed by Another Workflow
Execute Workflow Trigger
Save Long Term Memories
Google Docs
Saved response
Set
Respond with long term memories
Set
Retrieve Long Term Memories3
Google Docs
Send Success Message to Telegram
Set
Email Workflow Stats
Gmail
OpenAI Chat Model2
OpenAI
OpenAI Chat Model3
OpenAI
📤Send Memories to Telegram
Tool Workflow
📫Send Memories to Gmail
Tool Workflow
🧠Save Memories
Tool Workflow
🔎Retrieve Memories
Tool Workflow
🤯Window Buffer Memory
Memory Buffer Window
🧠 AI Agent w/Long Term Memory
Agent
🤖OpenAI Chat Model
OpenAI
Ⓜ️ When chat message received
Chat Trigger
Prepare Telegram Message
LLM Chain
Prepare Gmail Message
LLM Chain
Sticky Note
Sticky Note
Retrieve Long Term Memories
Google Docs
Memory Tool Router
Switch
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Sticky Note9
Sticky Note
Sticky Note10
Sticky Note
Sticky Note11
Sticky Note
Retrieve Long Term Memories2
Google Docs
Sticky Note12
Sticky Note
Sticky Note13
Sticky Note
Sticky Note14
Sticky Note
Sticky Note15
Sticky Note
Sticky Note16
Sticky Note