Automation library · Lead generation

AI lead gen & personalized email agent with Sheets and Apify

Started by an event in a connected app, and works across Gmail and Google Sheets. It hands the judgement calls to OpenRouter. 18 steps, 1 branch, 1 loop or waits: a working afternoon to understand properly.

MediumCalls a model: OpenRouter

18 stepsMedium: a working afternoon
1Branch: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 1Model 2Logic 8Service 7

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2Lead ConfigurationSetLogic
  3. 3OpenRouter Chat ModelLm Chat Open RouterModel
  4. 4Read URLs from Sheet1Google SheetsService
  5. 5Split OutSplit OutLogic
  6. 6E Mail PersonalizerChain LlmModel
  7. 7Trim URL1Function ItemService
  8. 8HTTP RequestHttp RequestService
  9. 9Update Google SheetsGoogle SheetsService
  10. 10Check Valid URL1IfLogic
  11. 11Map ResponseSetLogic
  12. 12Send a messageGmailService
  13. 13Fetch Website1Http RequestService
  14. 14FilterFilterLogic
  15. 15Filter1FilterLogic
  16. 16Remove DuplicatesRemove DuplicatesLogic
  17. 17Loop Over ItemsSplit In BatchesLogic
  18. 18Google SheetsGoogle SheetsService

How it's built

Starts on
An event in a connected app
Steps
18, with 1 branch, 1 loop or waits
Size
Medium: a working afternoon
Connects to
Gmail, Google Sheets
Model
OpenRouter

Questions

What does it need to run?

An n8n account, plus your own Gmail and Google Sheets accounts, and a key for OpenRouter. 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 OpenRouter. 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.