# Calendar Management & RAG Agent with OpenAI and OpenRouter: n8n workflow

> Started by someone opening a chat with it, and works across Google Calendar and n8n data table.

Source: https://millionrounds.com/workflow/calendar-management-and-rag-agent-with-openai-and-openrouter (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# 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.

Large Calls a model: OpenAI, OpenRouter Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcalendar-management-and-rag-agent-with-openai-and-openrouter)

**31 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 12 Logic 9 Service 9

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

- 1 **When chat message received** Chat trigger *Starts it*
- 2 **Simple Memory** Memory Buffer Window *Model*
- 3 **OpenRouter Chat Model1** Lm Chat Open Router *Model*
- 4 **Create Event** Google Calendar Tool *Service*
- 5 **Delete Event** Google Calendar Tool *Service*
- 6 **Get Event** Google Calendar Tool *Service*
- 7 **OpenRouter Chat Model2** Lm Chat Open Router *Model*
- 8 **Simple Memory1** Memory Buffer Window *Model*
- 9 **Update Event** Google Calendar Tool *Service*
- 10 **Brain** Lm Chat Open Ai *Model*
- 11 **Get row(s)** Data Table *Service*
- 12 **AI Agent** Agent *Model*
- 13 **Guardrails** Guardrails *Model*
- 14 **Classification Agent** Agent *Model*
- 15 **If** If *Logic*
- 16 **Respond to Chat2** Chat *Model*
- 17 **Get row(s)1** Data Table *Service*
- 18 **safe_to_reply** No Op *Logic*
- 19 **active_session** No Op *Logic*
- 20 **start_new** No Op *Logic*
- 21 **If2** If *Logic*
- 22 **If1** If *Logic*
- 23 **Insert row** Data Table *Service*
- 24 **increment** Data Table *Service*
- 25 **banned** No Op *Logic*
- 26 **approved1** No Op *Logic*
- 27 **approved** No Op *Logic*
- 28 **warning** Chat *Model*
- 29 **Banned1** Data Table *Service*
- 30 **Respond to Chat** Chat *Model*
- 31 **Banned** Chat *Model*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcalendar-management-and-rag-agent-with-openai-and-openrouter)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**AI secretary for scheduling with WhatsApp and Telegram** 31 steps · calls a model · Google Calendar, Redis](https://millionrounds.com/workflow/ai-secretary-for-scheduling-with-whatsapp-and-telegram)
- [**Ultimate AI assistant: Automate email, calendar, webSearch** 31 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ultimate-ai-assistant-automate-email-calendar-websearch)
- [**Validate property compliance risk and orchestrate actions** 31 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/validate-property-compliance-risk-and-orchestrate-actions)
- [**Route missed roofing calls to a Retell AI agent with Twilio** 31 steps · Google Calendar, Google Sheets](https://millionrounds.com/workflow/route-missed-roofing-calls-to-a-retell-ai-agent-with-twilio)
- [**Automate email & calendar management with Gmail** 32 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-email-and-calendar-management-with-gmail)
- [**Automate pet grooming posts & bookings with Facebook** 32 steps · calls a model · Google Calendar, Google Sheets](https://millionrounds.com/workflow/automate-pet-grooming-posts-and-bookings-with-facebook)
