Automation library · Scheduling

Automate email & calendar management with Gmail

Started by someone opening a chat with it, and works across Gmail, Google Calendar and in-memory vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 32 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 4Model 14Logic 2Service 12

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

  1. 1When chat message receivedChat triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Window Buffer MemoryMemory Buffer WindowModel
  4. 4When Executed by Another WorkflowExecute Workflow triggerStarts it
  5. 5Get last emailsGmail ToolService
  6. 6Get calendar eventsGoogle Calendar ToolService
  7. 7When clicking ‘Test workflow’Manual triggerStarts it
  8. 8Embeddings OpenAIEmbeddings Open AiModel
  9. 9Token SplitterText Splitter Token SplitterModel
  10. 10Embeddings OpenAI1Embeddings Open AiModel
  11. 11OpenAI Chat Model1Lm Chat Open AiModel
  12. 12Delete an emailGmail ToolService
  13. 13Create an Email Draft as response to a threadGmail ToolService
  14. 14Create an New Email DraftGmail ToolService
  15. 15Add an calender entryGoogle Calendar ToolService
  16. 16Gmail TriggerGmail triggerStarts it
  17. 17OpenAI Chat Model2Lm Chat Open AiModel
  18. 18Get an email by MessageIDGmail ToolService
  19. 19Determine the name of the day of the weekDate Time ToolService
  20. 20sessionId-masterNo OpLogic
  21. 21EMail AgentAgentModel
  22. 22Gmail - get recent ThreadsGmailService
  23. 23Read- Threads History Vector StoreVector Store In MemoryModel
  24. 24Write - Threads History Vector StoreVector Store In MemoryModel
  25. 25Default Data LoaderDocument Default Data LoaderModel
  26. 26Threads History Vector StoreVector Store In MemoryModel
  27. 27Research context and infos in previous conversationsTool Vector StoreModel
  28. 28Classify EmailsText ClassifierModel
  29. 29Gmail1GmailService
  30. 30Gmail - Label as CollegesGmailService
  31. 31Gmail label as kundeGmailService
  32. 32Code - Summarize Email Thread as TextCodeLogic

How it's built

Starts on
Someone opening a chat with it
Steps
32
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Calendar, in-memory vectors
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 and in-memory vectors accounts, and a key for OpenAI. 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. 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 32 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 32 steps before you point it at anything that matters.