Automation library · Lead generation

Generate and qualify B2B leads from Telegram with Google Maps

Started by an incoming Telegram message, and works across Gmail, Google Sheets and Telegram. It hands the judgement calls to OpenAI. 27 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

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

The flow

Starts it 1Model 3Logic 16Service 7

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

  1. 1Telegram Message TriggerTelegram triggerStarts it
  2. 2Build Search QueryFunctionLogic
  3. 3Post to Maps APIHttp RequestService
  4. 4Check for Next PageCodeLogic
  5. 5Split Out PlacesSplit OutLogic
  6. 6If More Pages ExistIfLogic
  7. 7Deduplicate All FieldsRemove DuplicatesLogic
  8. 8Set Search KeysSetLogic
  9. 9Post LinkedIn Search to APIHttp RequestService
  10. 10Merge Email and KeysMergeLogic
  11. 11Post Email Search to APIHttp RequestService
  12. 12Set LinkedIn ResultsSetLogic
  13. 13Merge LinkedIn and EmailMergeLogic
  14. 14Set Email Search ResultsSetLogic
  15. 15Set Company FieldsSetLogic
  16. 16AI Research AgentOpen AiModel
  17. 17Clean JSON DataCodeLogic
  18. 18Validate Contact InfoCodeLogic
  19. 19Score Lead DataCodeLogic
  20. 20Check Lead ScoreIfLogic
  21. 21Append Lead to SheetsGoogle SheetsService
  22. 22Generate Email ContentOpen AiModel
  23. 23Send Initial EmailGmailService
  24. 24Wait 3 DaysWaitLogic
  25. 25Generate Follow-up EmailOpen AiModel
  26. 26Send Follow-up EmailGmailService
  27. 27Send Telegram ReportTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
27, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Telegram accounts, and a key for 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 OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

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