Automation library · Alerts and monitoring

Automated Gmail classification & response system with OpenAI

Started by an arriving email, and works across Gmail and WhatsApp. It hands the judgement calls to OpenAI. 19 steps: a working afternoon to understand properly.

MediumCalls a model: OpenAI

19 stepsMedium: a working afternoon
0Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 6Service 12

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

  1. 1Gmail TriggerGmail triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Email ClassifierText ClassifierModel
  4. 4High Priority EmailGmailService
  5. 5Customer Support EmailGmailService
  6. 6Promotion EmailGmailService
  7. 7Finance/Billing EmailGmailService
  8. 8Random (General/Other) EmailGmailService
  9. 9Creating a DraftOpen AiModel
  10. 10Create EmailOpen AiModel
  11. 11Summarize PromotionsOpen AiModel
  12. 12Finance DepartmentOpen AiModel
  13. 13Draft emailGmailService
  14. 14Auto ReplyGmailService
  15. 15Promotional AlertWhats AppService
  16. 16Send to Finance DepartmentGmailService
  17. 17High Priority AlertWhats AppService
  18. 18ConfirmationWhats AppService
  19. 19Finance AlertWhats AppService

How it's built

Starts on
An arriving email
Steps
19
Size
Medium: a working afternoon
Connects to
Gmail, WhatsApp
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail and WhatsApp accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

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?

Plan an afternoon. 19 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 19 steps before you point it at anything that matters.