Automation library · Scheduling

AI secretary for scheduling with WhatsApp and Telegram

Started by an incoming Telegram message, and works across Google Calendar, Redis 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, 4 branches, 3 loops or waits: 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
4Branches: places the flow splits
3Loops or waits
3Services it connects to

The flow

Starts it 2Model 3Logic 18Service 8

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

  1. 1Simple MemoryMemory Buffer WindowModel
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Check ScheduleGoogle Calendar ToolService
  4. 4Create AppointmentGoogle Calendar ToolService
  5. 5Cancel AppointmentGoogle Calendar ToolService
  6. 6Telegram TriggerTelegram triggerStarts it
  7. 7on new message (Evolution)WebhookStarts it
  8. 8Calendar AI AgentAgentModel
  9. 9TELEGRAM - CHANNELSetLogic
  10. 10WHATSAPP - CHANNELSetLogic
  11. 11SPLIT USER MESSAGE (INPUT)SetLogic
  12. 12CHANNELSetLogic
  13. 13MESSAGES INTO JSON ARRAYSplit OutLogic
  14. 14VARIABLES - CONFIGSetLogic
  15. 15CHECK CHANNELSwitchLogic
  16. 16DATE NOWDate TimeLogic
  17. 17LOOP MESSAGE - WHATSAPPSplit In BatchesLogic
  18. 18LOOP MESSAGE - TELEGRAMSplit In BatchesLogic
  19. 19CHECK CHANNEL1SwitchLogic
  20. 20SEND MESSAGE WHATSAPPEvolution ApiService
  21. 21IF EXIST MESSAGEIfLogic
  22. 22OBJECT MSG - WHASTAPPCodeLogic
  23. 23OBJECT MSG - TELEGRAMCodeLogic
  24. 24SEND MESSAGE TELEGRAMTelegramService
  25. 25OBJECT MSGSetLogic
  26. 26REDIS - DEBOUNCE - SETRedisService
  27. 27REDIS - DEBOUNCE - GETRedisService
  28. 28HAS TIME PASSED?SwitchLogic
  29. 29REDIS - DEBOUNCE - DELETERedisService
  30. 30WAIT TIME - 5 SECONDS DEBOUNCEWaitLogic
  31. 31OBJECT MSG - CONCATENATECodeLogic

How it's built

Starts on
An incoming Telegram message
Steps
31, with 4 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Calendar, Redis, 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 Calendar, Redis 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.