Automation library · Lead generation

AI sales agent: fully email handling & lead scoring system

Started by a clock, and works across Gmail and NocoDB. It hands the judgement calls to OpenAI. 57 steps, 4 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

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

The flow

Starts it 4Model 3Logic 23Service 27

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

  1. 1Daily TriggerCronStarts it
  2. 2Hourly TriggerCronStarts it
  3. 3Gmail WebhookGmail triggerStarts it
  4. 4Brevo EventSend In Blue triggerStarts it
  5. 5Get All Active LeadsNoco DbService
  6. 6Get Top 10 LeadsNoco DbService
  7. 7Parse Response DataCodeLogic
  8. 8Parse Event DataCodeLogic
  9. 9Process in BatchesSplit In BatchesLogic
  10. 10Loop Over LeadsSplit In BatchesLogic
  11. 11Find Lead by EmailNoco DbService
  12. 12Find LeadNoco DbService
  13. 13Collect All ResultsAggregateLogic
  14. 14Calculate Score DecayCodeLogic
  15. 15Get Product InfoNoco DbService
  16. 16Get Previous CorrespondanceNoco DbService
  17. 17Get Current TemplateNoco DbService
  18. 18AI Intent ClassificationOpen AiModel
  19. 19Lead Found?IfLogic
  20. 20Generate Analytics ReportCodeLogic
  21. 21Update Lead ScoresNoco DbService
  22. 22All ProductsAggregateLogic
  23. 23All CorrespondanceAggregateLogic
  24. 24Current TemplateAggregateLogic
  25. 25Route By Response TypeSwitchLogic
  26. 26Log Engagement EventNoco DbService
  27. 27Send a messageGmailService
  28. 28Needs Re-engagement?IfLogic
  29. 29MergeMergeLogic
  30. 30Lead Pending ReviewNoco DbService
  31. 31Lead UnsubscribedNoco DbService
  32. 32Lead Out Of OfficeNoco DbService
  33. 33Get Previous ExchangeNoco DbService
  34. 34Get All ProductsNoco DbService
  35. 35Calculate Score UpdateCodeLogic
  36. 36Store AnalyticsNoco DbService
  37. 37Schedule Re-engagementNoco DbService
  38. 38AggregateAggregateLogic
  39. 39Create Manual ReviewNoco DbService
  40. 40All ExchangesAggregateLogic
  41. 41Aggregated ProductsAggregateLogic
  42. 42Update Lead EngagementNoco DbService
  43. 43Set Outreach VariablesSetLogic
  44. 44Notify Sales TeamGmailService
  45. 45Merge1MergeLogic
  46. 46Special Action Needed?IfLogic
  47. 47Generate Personalized EmailOpen AiModel
  48. 48Aggregate For ResponseAggregateLogic
  49. 49Delete a rowNoco DbService
  50. 50Send Initial Outreach EmailHttp RequestService
  51. 51Generate AI ResponseOpen AiModel
  52. 52Log OutreachNoco DbService
  53. 53Natural Response DelayWaitLogic
  54. 54Update Lead StatusNoco DbService
  55. 55Send AI ResponseGmailService
  56. 56Log InteractionNoco DbService
  57. 57Update Lead ScoreNoco DbService

How it's built

Starts on
A clock
Steps
57, with 4 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, NocoDB
Model
OpenAI

Questions

What does it need to run?

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

How long does it take to set up?

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