Automation library · Scheduling

Calendar Management & RAG Agent with OpenAI and OpenRouter

Started by someone opening a chat with it, and works across Google Calendar and n8n data table. It puts OpenAI and OpenRouter behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 31 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI, OpenRouterRetrieval

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

The flow

Starts it 1Model 12Logic 9Service 9

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

  1. 1When chat message receivedChat triggerStarts it
  2. 2Simple MemoryMemory Buffer WindowModel
  3. 3OpenRouter Chat Model1Lm Chat Open RouterModel
  4. 4Create EventGoogle Calendar ToolService
  5. 5Delete EventGoogle Calendar ToolService
  6. 6Get EventGoogle Calendar ToolService
  7. 7OpenRouter Chat Model2Lm Chat Open RouterModel
  8. 8Simple Memory1Memory Buffer WindowModel
  9. 9Update EventGoogle Calendar ToolService
  10. 10BrainLm Chat Open AiModel
  11. 11Get row(s)Data TableService
  12. 12AI AgentAgentModel
  13. 13GuardrailsGuardrailsModel
  14. 14Classification AgentAgentModel
  15. 15IfIfLogic
  16. 16Respond to Chat2ChatModel
  17. 17Get row(s)1Data TableService
  18. 18safe_to_replyNo OpLogic
  19. 19active_sessionNo OpLogic
  20. 20start_newNo OpLogic
  21. 21If2IfLogic
  22. 22If1IfLogic
  23. 23Insert rowData TableService
  24. 24incrementData TableService
  25. 25bannedNo OpLogic
  26. 26approved1No OpLogic
  27. 27approvedNo OpLogic
  28. 28warningChatModel
  29. 29Banned1Data TableService
  30. 30Respond to ChatChatModel
  31. 31BannedChatModel

How it's built

Starts on
Someone opening a chat with it
Steps
31, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Calendar, n8n data table
Model
OpenAI, OpenRouter
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 account, and a key for OpenAI and OpenRouter. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI and OpenRouter. 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.