AI Agents

Give the AI ​​agent a long-term memory tool router

39 nodes 200 125 Automatic trigger
Download

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. 1.Activate the AI agent through a chat trigger to receive user commands and inquiries
  2. 2.Route requests to the buffered memory tool to retrieve previous context and stored information
  3. 3.Execute advanced language chains to process requests based on the retrieved memory context
  4. 4.Integrate with Gmail, Twitter, Telegram, and Google Docs to automatically save results and responses
  5. 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

Twitter/X Google Docs Telegram Gmail OpenAI Tool Memory AI Agent Chat Trigger LLM Chain

Details

Trigger Automatic trigger
Nodes 39
Apps 10
Views 200
Downloads 125

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (39)

/

When Executed by Another Workflow

Execute Workflow Trigger

#1

Save Long Term Memories

Google Docs

#2

Saved response

Set

#3

Respond with long term memories

Set

#4

Retrieve Long Term Memories3

Google Docs

#5

Send Success Message to Telegram

Set

#6

Email Workflow Stats

Gmail

#7

OpenAI Chat Model2

OpenAI

#8

OpenAI Chat Model3

OpenAI

#9

📤Send Memories to Telegram

Tool Workflow

#10

📫Send Memories to Gmail

Tool Workflow

#11

🧠Save Memories

Tool Workflow

#12

🔎Retrieve Memories

Tool Workflow

#13

🤯Window Buffer Memory

Memory Buffer Window

#14

🧠 AI Agent w/Long Term Memory

Agent

#15

🤖OpenAI Chat Model

OpenAI

#16

Ⓜ️ When chat message received

Chat Trigger

#17

Prepare Telegram Message

LLM Chain

#18

Prepare Gmail Message

LLM Chain

#19

Sticky Note

Sticky Note

#20

Retrieve Long Term Memories

Google Docs

#21

Memory Tool Router

Switch

#22

Sticky Note1

Sticky Note

#23

Sticky Note2

Sticky Note

#24

Sticky Note3

Sticky Note

#25

Sticky Note4

Sticky Note

#26

Sticky Note5

Sticky Note

#27

Sticky Note6

Sticky Note

#28

Sticky Note7

Sticky Note

#29

Sticky Note8

Sticky Note

#30

Sticky Note9

Sticky Note

#31

Sticky Note10

Sticky Note

#32

Sticky Note11

Sticky Note

#33

Retrieve Long Term Memories2

Google Docs

#34

Sticky Note12

Sticky Note

#35

Sticky Note13

Sticky Note

#36

Sticky Note14

Sticky Note

#37

Sticky Note15

Sticky Note

#38

Sticky Note16

Sticky Note

#39