Automation library · Chat assistants

Triage Gmail and draft replies with Ollama and Telegram

Started by an event in a connected app, and works across Gmail, Google Sheets and Telegram. It hands the judgement calls to a local model. 18 steps, 2 branches: a working afternoon to understand properly.

MediumCalls a model: a local model

18 stepsMedium: a working afternoon
2Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 8Logic 4Service 5

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

  1. 1Manual TriggerManual triggerStarts it
  2. 2Ollama Chat ModelLm Chat OllamaModel
  3. 3Structured Output ParserOutput Parser StructuredModel
  4. 4Ollama Chat Model1Lm Chat OllamaModel
  5. 5Get Unread EmailsGmailService
  6. 6Classifier ChainChain LlmModel
  7. 7Extractor ChainChain LlmModel
  8. 8Drafter ChainChain LlmModel
  9. 9Extractor Output ParserOutput Parser StructuredModel
  10. 10Drafter Output ParserOutput Parser StructuredModel
  11. 11BuildClassifierRequestCodeLogic
  12. 12IfNeedsProcessingIfLogic
  13. 13Telegram ApprovalTelegramService
  14. 14Skip-NoActionNeededSetLogic
  15. 15Approved?IfLogic
  16. 16Create Draft ReplyGmailService
  17. 17Log Approved DecisionGoogle SheetsService
  18. 18Label as TriagedGmailService

How it's built

Starts on
An event in a connected app
Steps
18, with 2 branches
Size
Medium: a working afternoon
Connects to
Gmail, Google Sheets, Telegram
Model
a local model

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Telegram accounts, and a key for a local model. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls a local model. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

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