Automation library · Scheduling

Build a multi-functional Telegram bot with Gemini

Started by an incoming Telegram message, and works across Google Calendar, Google Docs, Google Drive, Qdrant and one other. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 65 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

65 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
2Loops or waits
5Services it connects to

The flow

Starts it 1Model 20Logic 6Service 33

The steps in the order they run, from what starts it. The first 60 of 65.

  1. 1Listen for incoming eventsTelegram triggerStarts it
  2. 2Google Gemini Chat ModelLm Chat Google GeminiModel
  3. 3ThinkTool ThinkModel
  4. 4CalculatorTool CalculatorModel
  5. 5Date & TimeDate Time ToolService
  6. 6Brave SearchBrave Search ToolService
  7. 7Google Calendar Create EventGoogle Calendar ToolService
  8. 8Google Calendar Next HolidayGoogle Calendar ToolService
  9. 9Embeddings OpenAI1Embeddings Open AiModel
  10. 10Gemini for RAG AnswerLm Chat Google GeminiModel
  11. 11Embeddings OpenAIEmbeddings Open AiModel
  12. 12Token SplitterText Splitter Token SplitterModel
  13. 13Google Gemini Chat Model1Lm Chat Google GeminiModel
  14. 14Think1Tool ThinkModel
  15. 15Calculator1Tool CalculatorModel
  16. 16Date & Time1Date Time ToolService
  17. 17Brave Search1Brave Search ToolService
  18. 18Google Calendar Create Event1Google Calendar ToolService
  19. 19Google Calendar Next Holiday1Google Calendar ToolService
  20. 20Window Buffer Memory2Memory Buffer WindowModel
  21. 21Window Buffer MemoryMemory Buffer WindowModel
  22. 22Airbnb MCPMcp Client ToolService
  23. 23Airbnb ToolsMcp Client ToolService
  24. 24Airbnb MCP1Mcp Client ToolService
  25. 25Airbnb Tools1Mcp Client ToolService
  26. 26Send Typing actionTelegramService
  27. 27Determine content type1SwitchLogic
  28. 28AI Agent1AgentModel
  29. 29Qdrant Vector Store1Vector Store QdrantModel
  30. 30Question and Answer ChainChain Retrieval QaModel
  31. 31Qdrant Vector StoreVector Store QdrantModel
  32. 32Default Data LoaderDocument Default Data LoaderModel
  33. 33AI Agent3AgentModel
  34. 34Help Responder1TelegramService
  35. 35Refresh collectionHttp RequestService
  36. 36Get PDFGoogle DriveService
  37. 37Google Calendar 2Google CalendarService
  38. 38Brave Search 2Brave SearchService
  39. 39Download voice fileTelegramService
  40. 40Edit FieldsSetLogic
  41. 41Send AI Text Response (Chat)TelegramService
  42. 42Vector Store RetrieverRetriever Vector StoreModel
  43. 43Send RAG Answer via TelegramTelegramService
  44. 44WaitWaitLogic
  45. 45Call Replicate APIHttp RequestService
  46. 46Search PDFsGoogle DriveService
  47. 47Mistral UploadHttp RequestService
  48. 48Send Birthday List via TelegramTelegramService
  49. 49Send Brave Search Results via TelegramTelegramService
  50. 50Convert audio to textOpen AiModel
  51. 51Google DriveGoogle DriveService
  52. 52Loop Over ItemsSplit In BatchesLogic
  53. 53Download Replicate AudioHttp RequestService
  54. 54Send PDF Search Results via TelegramTelegramService
  55. 55Mistral Signed URLHttp RequestService
  56. 56Combine content and set propertiesSetLogic
  57. 57Google DocsGoogle DocsService
  58. 58Send Qdrant Indexing ConfirmationTelegramService
  59. 59Set pageSetLogic
  60. 60Send AI Voice Response via TelegramTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
65, with 1 branch, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Calendar, Google Docs, Google Drive, Qdrant, Telegram
Model
Gemini, 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 Calendar, Google Docs, Google Drive, Qdrant and Telegram accounts, and a key for Gemini and 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 Gemini and 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 65 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 65 steps before you point it at anything that matters.