Automation library · Lead generation

Triage Gmail, draft replies and log leads with OpenAI

Started by an arriving email, and works across Gmail, Google Sheets, Slack and Telegram. 30 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large

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

The flow

Starts it 2Logic 10Service 18

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

  1. 1Gmail Trigger - New EmailGmail triggerStarts it
  2. 2On Workflow FailureError triggerStarts it
  3. 3ConfigurationSetLogic
  4. 4Send Failure AlertTelegramService
  5. 5Extract Email DetailsCodeLogic
  6. 6Skip Ignored Senders?IfLogic
  7. 7Skip - Self SentNo OpLogic
  8. 8AI: Classify EmailHttp RequestService
  9. 9Parse ClassificationCodeLogic
  10. 10Log Every Email to SheetGoogle SheetsService
  11. 11Route by CategorySwitchLogic
  12. 12Label as UrgentGmailService
  13. 13AI: Draft Support ReplyHttp RequestService
  14. 14AI: Extract Sales Lead InfoHttp RequestService
  15. 15AI: Extract Meeting DetailsHttp RequestService
  16. 16Label & Archive PromotionalGmailService
  17. 17Label as Needs ReviewGmailService
  18. 18Send Instant Slack AlertSlackService
  19. 19Parse Support DraftCodeLogic
  20. 20Parse Lead InfoCodeLogic
  21. 21Parse Meeting DetailsCodeLogic
  22. 22Create Support Draft in GmailGmailService
  23. 23Log Lead to CRM SheetGoogle SheetsService
  24. 24Create Meeting Draft in GmailGmailService
  25. 25Label as SupportGmailService
  26. 26AI: Draft Sales ReplyHttp RequestService
  27. 27Label as MeetingGmailService
  28. 28Parse Sales DraftCodeLogic
  29. 29Create Sales Draft in GmailGmailService
  30. 30Label as Sales LeadGmailService

How it's built

Starts on
An arriving email
Steps
30, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, Slack, Telegram
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

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

What starts it?

It starts on an arriving email.

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 30 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 30 steps before you point it at anything that matters.