Automation library · Chat assistants

Company knowledge base agent (RAG) with OpenAI

Started by an incoming Telegram message, and works across Google Drive, Supabase, Supabase vectors and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 31 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

31 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 3Model 16Logic 5Service 7

The steps in the order they run, from what starts it.

  1. 1Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3New FileGoogle Drive triggerStarts it
  4. 4File UpdatedGoogle Drive triggerStarts it
  5. 5Recursive Character Text Splitter1Text Splitter Recursive Character Text SplitterModel
  6. 6Embeddings OpenAI1Embeddings Open AiModel
  7. 7Telegram TriggerTelegram triggerStarts it
  8. 8Window Buffer Memory1Memory Buffer WindowModel
  9. 9OpenAI Chat Model2Lm Chat Open AiModel
  10. 10Embeddings OpenAI3Embeddings Open AiModel
  11. 11OpenAI Chat Model3Lm Chat Open AiModel
  12. 12Default Data LoaderDocument Default Data LoaderModel
  13. 13Supabase Vector StoreVector Store SupabaseModel
  14. 14Set IDSetLogic
  15. 15Delete Row(s)SupabaseService
  16. 16Default Data Loader1Document Default Data LoaderModel
  17. 17Supabase Vector Store1Vector Store SupabaseModel
  18. 18Voice or TextSwitchLogic
  19. 19RAG AgentAgentModel
  20. 20MarketingLadderTool Vector StoreModel
  21. 21Supabase Vector Store3Vector Store SupabaseModel
  22. 22Download FileGoogle DriveService
  23. 23Get FIle IDSetLogic
  24. 24Download File2TelegramService
  25. 25TextSetLogic
  26. 26ResponseTelegramService
  27. 27Extract from FileExtract From FileService
  28. 28ReformatLimitLogic
  29. 29TranscribeOpen AiModel
  30. 30Download File1Google DriveService
  31. 31Extract from File1Extract From FileService

How it's built

Starts on
An incoming Telegram message
Steps
31, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Supabase, Supabase vectors, Telegram
Model
OpenAI
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Google Drive, Supabase, Supabase vectors and Telegram accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 31 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 31 steps before you point it at anything that matters.