Automation library · Content

Chat with OpenAI and Telegram

Started by an incoming Telegram message, and works across Telegram and in-memory vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 22 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

22 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 10Logic 6Service 5

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

  1. 1VLM Agent2Lm Chat Open AiModel
  2. 2VLM Agent3Lm Chat Open AiModel
  3. 3Embeddings OpenAIEmbeddings Open AiModel
  4. 4Default Data LoaderDocument Default Data LoaderModel
  5. 5Listen to Telegram for LinkTelegram triggerStarts it
  6. 6OpenAI Chat ModelLm Chat Open AiModel
  7. 7VLM Run HighlighterAgentModel
  8. 8Structured Output Parser1Output Parser StructuredModel
  9. 9Insert Data to StoreVector Store In MemoryModel
  10. 10Query Data ToolVector Store In MemoryModel
  11. 11Check Whether URLIfLogic
  12. 12AI AgentAgentModel
  13. 13Covert to Text FileConvert To FileService
  14. 14Check URLs ValidityIfLogic
  15. 15Rename Link FieldSetLogic
  16. 16Send a ReplyTelegramService
  17. 17Send a documentTelegramService
  18. 18Split OutSplit OutLogic
  19. 19No Operation, do nothing1No OpLogic
  20. 20CodeCodeLogic
  21. 21Start AskingTelegramService
  22. 22HTTP Request1Http RequestService

How it's built

Starts on
An incoming Telegram message
Steps
22, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Telegram, in-memory vectors
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 Telegram and in-memory vectors 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 22 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 22 steps before you point it at anything that matters.