Automation library · Chat assistants

Telegram bot starter template setup & AI agent chatbot

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

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 1Model 7Logic 14Service 7

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

  1. 1TriggerTelegram triggerStarts it
  2. 2TextDataExampleSetLogic
  3. 3Agent: Find in the InternetTool WorkflowModel
  4. 4Simple MemoryMemory Buffer WindowModel
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Agent: Check Order StatusTool WorkflowModel
  7. 7Agent: Search Internal DocsTool WorkflowModel
  8. 8Agent: Calculate Cost or QuoteTool WorkflowModel
  9. 9Global dataSetLogic
  10. 10AI AgentAgentModel
  11. 11SwitchSwitchLogic
  12. 12Telegram4TelegramService
  13. 13Switch_MessageTypeSwitchLogic
  14. 14Telegram3TelegramService
  15. 15Start bot?IfLogic
  16. 16Trigger Data for PaymentSetLogic
  17. 17Command?IfLogic
  18. 18Telegram1TelegramService
  19. 19Telegram2TelegramService
  20. 20Telegram5TelegramService
  21. 21MenuSwitchLogic
  22. 22Trigger Data for RegisterSetLogic
  23. 23Change statusGoogle SheetsService
  24. 24Payment HandlerExecute WorkflowLogic
  25. 25Switch_CommandsSwitchLogic
  26. 26RegisterExecute WorkflowLogic
  27. 27Data for InvoiceSetLogic
  28. 28Telegram6TelegramService
  29. 29Send InvoiceExecute WorkflowLogic

How it's built

Starts on
An incoming Telegram message
Steps
29, with 6 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, 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 Sheets 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 29 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 29 steps before you point it at anything that matters.