Automation library · Lead generation

Automate business partner outreach with Google Maps and OpenAI

Started by a clock, and works across Apify, Google Drive, Google Sheets and Pinecone. It puts OpenAI and Perplexity behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 55 steps, 2 branches, 5 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI, PerplexityRetrieval

55 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
5Loops or waits
4Services it connects to

The flow

Starts it 5Model 13Logic 16Service 21

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

  1. 1Incoming messageWaha triggerStarts it
  2. 2Manual Trigger - Start ScrapingManual triggerStarts it
  3. 3Daily Outbound ScheduleSchedule triggerStarts it
  4. 4Schedule Outbound messageSchedule triggerStarts it
  5. 5Knowledge Base Updated TriggerGoogle Drive triggerStarts it
  6. 6Reply Handler LLMLm Chat Open AiModel
  7. 7Outbound Message LLMLm Chat Open AiModel
  8. 8Reply Conversation MemoryMemory Postgres ChatModel
  9. 9Outbound Conversation MemoryMemory Postgres ChatModel
  10. 10Knowledge Embeddings ModelEmbeddings Open AiModel
  11. 11Query Embeddings ModelEmbeddings Open AiModel
  12. 12Search Result RerankerReranker CohereModel
  13. 13Text Chunk ProcessorText Splitter Recursive Character Text SplitterModel
  14. 14Save Lead Contact InformationGoogle Sheets ToolService
  15. 15Extract WhatsApp Session DataSetLogic
  16. 16Configure Scraping ParametersSetLogic
  17. 17Get Unenriched RecordsGoogle SheetsService
  18. 18Get Outbound CandidatesGoogle SheetsService
  19. 19Download Knowledge DocumentGoogle DriveService
  20. 20Reply Handler AI AgentAgentModel
  21. 21Outbound Message GeneratorAgentModel
  22. 22Store Knowledge EmbeddingsVector Store PineconeModel
  23. 23Query Knowledge BaseVector Store PineconeModel
  24. 24Document Content LoaderDocument Default Data LoaderModel
  25. 25Execute Google Maps ScraperApifyService
  26. 26Limit Enrichment Batch SizeLimitLogic
  27. 27Limit Outbound Batch SizeLimitLogic
  28. 28Parse Document via LlamaIndexHttp RequestService
  29. 29Format Reply Message DataSetLogic
  30. 30Format Outbound Message DataSetLogic
  31. 31Fetch Scraped Business DataHttp RequestService
  32. 32Split Records for ProcessingSplit OutLogic
  33. 33Validate Phone Number ExistsIfLogic
  34. 34Monitor Document ProcessingHttp RequestService
  35. 35Wait Before Read Receipt - ReplyWaitLogic
  36. 36Wait Before Read Receipt - OutboundWaitLogic
  37. 37Save Raw Business LeadsGoogle SheetsService
  38. 38Business Data EnrichmentPerplexityService
  39. 39Prepare Outbound Session DataSetLogic
  40. 40Check Parsing CompletionIfLogic
  41. 41Show Typing Indicator - ReplyGowaService
  42. 42Show Typing Indicator - OutboundGowaService
  43. 43Parse Enrichment ResponseCodeLogic
  44. 44Retrieve Parsed ContentHttp RequestService
  45. 45Wait Before Status RecheckWaitLogic
  46. 46Mark Message as Read - ReplyGowaService
  47. 47Mark Message as Read - OutboundGowaService
  48. 48Save Enriched Business DataGoogle SheetsService
  49. 49Simulate Typing Delay - ReplyWaitLogic
  50. 50Simulate Typing Delay - OutboundWaitLogic
  51. 51Stop Typing Indicator - ReplyGowaService
  52. 52Stop Typing Indicator - OutboundGowaService
  53. 53Send WhatsApp ReplyGowaService
  54. 54Send Outbound WhatsApp MessageGowaService
  55. 55Mark as ContactedGoogle SheetsService

How it's built

Starts on
A clock
Steps
55, with 2 branches, 5 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Apify, Google Drive, Google Sheets, Pinecone
Model
OpenAI, Perplexity
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 Apify, Google Drive, Google Sheets and Pinecone accounts, and a key for OpenAI and Perplexity. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI and Perplexity. 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 55 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 55 steps before you point it at anything that matters.