Automation library · Alerts and monitoring

Organize Gmail with OpenAI and Telegram

Started by an arriving email, and works across Gmail, Telegram and WhatsApp. It puts Gemini, OpenAI and one other behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

23 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 1Model 9Logic 5Service 8

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

  1. 1Gmail Trigger1Gmail triggerStarts it
  2. 2Check Sent2Gmail ToolService
  3. 3Check Sent3Gmail ToolService
  4. 4OpenRouter Chat Model2Lm Chat Open RouterModel
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Google Gemini Chat Model2Lm Chat Google GeminiModel
  7. 7Google Gemini Chat Model3Lm Chat Google GeminiModel
  8. 8Simple Memory1Memory Buffer WindowModel
  9. 9OpenRouter Chat Model3Lm Chat Open RouterModel
  10. 10Get a message1GmailService
  11. 11AI Agent3AgentModel
  12. 12Structured Output Parser1Output Parser StructuredModel
  13. 13AI Agent1AgentModel
  14. 14Loop Over Items1Split In BatchesLogic
  15. 15Code1CodeLogic
  16. 16Create Label if Doesn't exist1GmailService
  17. 17If1IfLogic
  18. 18Wait1WaitLogic
  19. 19Get Existing Labels1GmailService
  20. 20Send a text message1TelegramService
  21. 21Send message1Whats AppService
  22. 22Filter1FilterLogic
  23. 23Add label to thread1GmailService

How it's built

Starts on
An arriving email
Steps
23, with 1 branch, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Telegram, WhatsApp
Model
Gemini, 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 Gmail, Telegram and WhatsApp accounts, and a key for Gemini and 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 Gemini, 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 23 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 23 steps before you point it at anything that matters.