Automation library · Scheduling

Personal AI agent with Gemini and Gmail

Started by an incoming Telegram message, and works across Gmail, Google Calendar, Google Sheets and Telegram. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 28 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: GeminiRetrieval

28 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 2Model 6Logic 2Service 18

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

  1. 1SendGmail ToolService
  2. 2ReplyGmail ToolService
  3. 3DeleteGmail ToolService
  4. 4Get ManyGmail ToolService
  5. 5GeminiLm Chat Google GeminiModel
  6. 6Telegram TriggerTelegram triggerStarts it
  7. 7Gmail TriggerGmail triggerStarts it
  8. 8Create EventGoogle Calendar ToolService
  9. 9Get Many2Google Calendar ToolService
  10. 10Delete2Google Calendar ToolService
  11. 11Date & TimeDate Time ToolService
  12. 12UpdateGoogle Calendar ToolService
  13. 13Get ContactsGoogle Sheets ToolService
  14. 14Add ContactsGoogle Sheets ToolService
  15. 15Simple MemoryMemory Buffer WindowModel
  16. 16Gemini1Lm Chat Google GeminiModel
  17. 17AI AgentAgentModel
  18. 18IfIfLogic
  19. 19Basic LLM ChainChain LlmModel
  20. 20Text ClassifierText ClassifierModel
  21. 21Send a text messageTelegramService
  22. 22No Operation, do nothingNo OpLogic
  23. 23Send a text message1TelegramService
  24. 24ClientGmailService
  25. 25Sponsorship RequestGmailService
  26. 26Not BusinessGmailService
  27. 27Reply to a messageGmailService
  28. 28Reply to a message1GmailService

How it's built

Starts on
An incoming Telegram message
Steps
28, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Calendar, Google Sheets, Telegram
Model
Gemini
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, Google Sheets and Telegram accounts, and a key for Gemini. 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 Gemini. 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 28 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 28 steps before you point it at anything that matters.