Automation library · Chat assistants

Multi-account email classifier with Gmail and Discord

Started by another system calling it, and works across Discord, Gmail and Google Sheets. It hands the judgement calls to OpenAI. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

22 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 5Model 5Logic 6Service 6

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

  1. 1Gmail TriggerGmail triggerStarts it
  2. 2Gmail Trigger1Gmail triggerStarts it
  3. 3Gmail Trigger2Gmail triggerStarts it
  4. 4Gmail Trigger3Gmail triggerStarts it
  5. 5WebhookWebhookStarts it
  6. 6OpenAI Chat Model1Lm Chat Open AiModel
  7. 7Get spam listGoogle Sheets ToolService
  8. 8Get a message in DiscordDiscord ToolService
  9. 9update spam listGoogle Sheets ToolService
  10. 10OpenAI Chat Model3Lm Chat Open AiModel
  11. 11Get spam list1Google Sheets ToolService
  12. 12Structured Output Parser1Output Parser StructuredModel
  13. 13medium7SetLogic
  14. 14Merge4MergeLogic
  15. 15medium6SetLogic
  16. 16medium5SetLogic
  17. 17medium4SetLogic
  18. 18AI Agent1AgentModel
  19. 19AI Agent2AgentModel
  20. 20Discord - reply1DiscordService
  21. 21If2IfLogic
  22. 22Send a messageDiscordService

How it's built

Starts on
Another system calling it
Steps
22, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Discord, Gmail, Google Sheets
Model
OpenAI

Questions

What does it need to run?

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

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