Automation library · Lead generation

Automated lead nurturing with Gemini and Telegram

Started by an incoming Telegram message, and works across Email, Gmail, Telegram and n8n data table. It hands the judgement calls to Gemini. 42 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini

42 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
1Loop or waits
4Services it connects to

The flow

Starts it 4Model 12Logic 10Service 16

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

  1. 1Telegram Input - Agent Submits LeadTelegram triggerStarts it
  2. 2Gemini Model - ParserLm Chat Google GeminiModel
  3. 3JSON Output ParserOutput Parser StructuredModel
  4. 4Gemini Model - Email GeneratorLm Chat Google GeminiModel
  5. 5Email JSON ParserOutput Parser StructuredModel
  6. 6Daily Reply Check (9 AM)Schedule triggerStarts it
  7. 7Daily Follow-up Check (10 AM)Schedule triggerStarts it
  8. 8Gemini Model - Email Generator1Lm Chat Google GeminiModel
  9. 9Email JSON Parser1Output Parser StructuredModel
  10. 10Daily Follow-up Check (10 AM)1Schedule triggerStarts it
  11. 11Gemini Model - Email Generator2Lm Chat Google GeminiModel
  12. 12Email JSON Parser2Output Parser StructuredModel
  13. 13AI - Parse Lead DataChain LlmModel
  14. 14AI - Generate Personalized EmailChain LlmModel
  15. 15Get row(s)Data TableService
  16. 16Get row(s)1Data TableService
  17. 17AI - Generate Personalized 2nd Follow Up EmailChain LlmModel
  18. 18Get row(s)2Data TableService
  19. 19AI - Generate Personalized 3rd Follow Up EmailChain LlmModel
  20. 20Insert rowData TableService
  21. 21Set EmailSetLogic
  22. 22Loop Over ItemsSplit In BatchesLogic
  23. 23Initialize Lead Follow UpSetLogic
  24. 24Set 2nd Follow UpSetLogic
  25. 25If lastSentDate was 24 hours agoIfLogic
  26. 26Set 3rd Follow UpSetLogic
  27. 27Initialize Lead TrackingSetLogic
  28. 28Send emailEmail SendService
  29. 29Is This a Reply from Lead?IfLogic
  30. 30Get many messagesGmailService
  31. 31Send email 2Email SendService
  32. 32Initialize Lead 3rd Follow UpSetLogic
  33. 33Send email 3Email SendService
  34. 34Update row(s)Data TableService
  35. 35Notify Agent - Reply ReceivedTelegramService
  36. 36Update row(s)1Data TableService
  37. 37Update row(s) and Update StatusData TableService
  38. 38Notify Agent - Email SentTelegramService
  39. 39Mark Lead as RepliedSetLogic
  40. 40Notify Agent - Email Sent1TelegramService
  41. 41Notify Agent - Sequence Complete1TelegramService
  42. 42Mark As RepliedData TableService

How it's built

Starts on
An incoming Telegram message
Steps
42, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Email, Gmail, Telegram, n8n data table
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Email, Gmail 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. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 42 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 42 steps before you point it at anything that matters.