Automation library · Alerts and monitoring

Categorize emails & get Telegram alerts with Azure OpenAI

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

LargeCalls a model: Azure OpenAIRetrieval

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

The flow

Starts it 1Model 5Logic 7Service 10

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

  1. 1Email Trigger (IMAP)Email Read ImapService
  2. 2Telegram TriggerTelegram triggerStarts it
  3. 3Azure OpenAI AgentLm Chat Azure Open AiModel
  4. 4Azure OpenAI ClassifierLm Chat Azure Open AiModel
  5. 5MemoryMemory Buffer WindowModel
  6. 6Update StatusGoogle Sheets ToolService
  7. 7Get User IDGoogle SheetsService
  8. 8Get E-MailsGoogle SheetsService
  9. 9Append User IDGoogle SheetsService
  10. 10AI AgentAgentModel
  11. 11E-Mail Text ClassifierText ClassifierModel
  12. 12Mail InformationSetLogic
  13. 13AggregateAggregateLogic
  14. 14Reply To UserTelegramService
  15. 15Send Security MessageTelegramService
  16. 16Send Personal MessageTelegramService
  17. 17Send Reply MessageTelegramService
  18. 18Like im young againNo OpLogic
  19. 19Nothing will changeNo OpLogic
  20. 20If NullIfLogic
  21. 21Set Rows as DataSetLogic
  22. 22Append Mail DetailsGoogle SheetsService
  23. 23NothingNo OpLogic

How it's built

Starts on
An incoming Telegram message
Steps
23, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Email, Google Sheets, Telegram
Model
Azure 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 Email, Google Sheets and Telegram accounts, and a key for Azure OpenAI. 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 Azure 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 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.