Automation library · Scheduling

Inbox manager with OpenAI and Google Calendar

Started by an arriving email, and works across Gmail, Google Calendar, Supabase vectors and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 34 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 1Model 17Logic 3Service 13

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

  1. 1Gmail TriggerGmail triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Structured Output Parser2Output Parser StructuredModel
  4. 4get_eventsGoogle Calendar ToolService
  5. 5Structured Output ParserOutput Parser StructuredModel
  6. 6think_toolTool ThinkModel
  7. 7OpenAI Chat Model5Lm Chat Open AiModel
  8. 8OpenAI Chat Model7Lm Chat Open AiModel
  9. 9Structured Output Parser6Output Parser StructuredModel
  10. 10Window Buffer MemoryMemory Buffer WindowModel
  11. 11OpenAI Chat Model1Lm Chat Open AiModel
  12. 12Embeddings OpenAI2Embeddings Open AiModel
  13. 13OpenAI Chat Model2Lm Chat Open AiModel
  14. 14Text ClassifierText ClassifierModel
  15. 15Knowledge AgentAgentModel
  16. 16Calendar AgentAgentModel
  17. 17Calendar or EmailChain LlmModel
  18. 18Knowledge DatabaseTool Vector StoreModel
  19. 19Supabase Vector Store2Vector Store SupabaseModel
  20. 20Sales / LeadsGmailService
  21. 21Client CommGmailService
  22. 22Reports / ResultsGmailService
  23. 23Billing / AdminGmailService
  24. 24OtherGmailService
  25. 25Escalate?IfLogic
  26. 26Gmail2GmailService
  27. 27SwitchSwitchLogic
  28. 28GmailGmailService
  29. 29Mark as Read3GmailService
  30. 30Telegram2TelegramService
  31. 31Gmail3GmailService
  32. 32Inbox BotTelegramService
  33. 33Get ThreadCodeLogic
  34. 34TelegramTelegramService

How it's built

Starts on
An arriving email
Steps
34, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Calendar, Supabase vectors, 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 Gmail, Google Calendar, Supabase vectors 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 arriving email.

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 34 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 34 steps before you point it at anything that matters.