Automation library · Content

Send bulk email campaigns with Gmail and SMTP

Started by another system calling it, and works across Gmail and Postgres. 28 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large

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

The flow

Starts it 4Logic 11Service 13

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

  1. 1Campaign Upload WebhookWebhookStarts it
  2. 2Campaign SchedulerSchedule triggerStarts it
  3. 3Email Event WebhookWebhookStarts it
  4. 4Analytics SchedulerSchedule triggerStarts it
  5. 5Workflow ConfigurationSetLogic
  6. 6Get Pending CampaignsPostgresService
  7. 7Parse Event DataCodeLogic
  8. 8Get Performance DataPostgresService
  9. 9Extract CSV LeadsExtract From FileService
  10. 10Split CampaignsSplit OutLogic
  11. 11Log Email EventPostgresService
  12. 12Calculate Best Send TimesCodeLogic
  13. 13Split LeadsSplit OutLogic
  14. 14Get Campaign LeadsPostgresService
  15. 15Update Performance StatsPostgresService
  16. 16Update Send Time RulesPostgresService
  17. 17Validate Email & Extract DomainCodeLogic
  18. 18Split Campaign LeadsSplit OutLogic
  19. 19Is Email Valid?IfLogic
  20. 20Calculate Send Time & Select InboxCodeLogic
  21. 21Check Domain MX RecordsHttp RequestService
  22. 22Store Invalid LeadPostgresService
  23. 23Wait Until Send TimeWaitLogic
  24. 24Enrich Lead DataCodeLogic
  25. 25Send EmailGmailService
  26. 26Store Valid LeadPostgresService
  27. 27Log Send EventPostgresService
  28. 28Update Inbox StatsPostgresService

How it's built

Starts on
Another system calling it
Steps
28, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Postgres
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Gmail and Postgres accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

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