# Multi-account email classifier with Gmail and Discord: n8n workflow

> Started by another system calling it, and works across Discord, Gmail and Google Sheets. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/multi-account-email-classifier-with-gmail-and-discord (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# 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.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmulti-account-email-classifier-with-gmail-and-discord)

**22 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 5 Model 5 Logic 6 Service 6

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

- 1 **Gmail Trigger** Gmail trigger *Starts it*
- 2 **Gmail Trigger1** Gmail trigger *Starts it*
- 3 **Gmail Trigger2** Gmail trigger *Starts it*
- 4 **Gmail Trigger3** Gmail trigger *Starts it*
- 5 **Webhook** Webhook *Starts it*
- 6 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 7 **Get spam list** Google Sheets Tool *Service*
- 8 **Get a message in Discord** Discord Tool *Service*
- 9 **update spam list** Google Sheets Tool *Service*
- 10 **OpenAI Chat Model3** Lm Chat Open Ai *Model*
- 11 **Get spam list1** Google Sheets Tool *Service*
- 12 **Structured Output Parser1** Output Parser Structured *Model*
- 13 **medium7** Set *Logic*
- 14 **Merge4** Merge *Logic*
- 15 **medium6** Set *Logic*
- 16 **medium5** Set *Logic*
- 17 **medium4** Set *Logic*
- 18 **AI Agent1** Agent *Model*
- 19 **AI Agent2** Agent *Model*
- 20 **Discord - reply1** Discord *Service*
- 21 **If2** If *Logic*
- 22 **Send a message** Discord *Service*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmulti-account-email-classifier-with-gmail-and-discord)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Discord](https://millionrounds.com/workflows?service=Discord#library)[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Audit browser and proxy fingerprint/IP integrity with OpenAI** 22 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/audit-browser-and-proxy-fingerprint-ip-integrity-with-openai)
- [**Audit landing page conversions with DeepSeek and Google Sheets** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/audit-landing-page-conversions-with-deepseek-and-google-shee)
- [**Detect multi-source transaction fraud and reconcile finances** 22 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/detect-multi-source-transaction-fraud-and-reconcile-finances)
- [**Empower your AI chatbot with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/empower-your-ai-chatbot-with-openai-and-gmail)
- [**Find reply-worthy Hacker News and Stack Overflow threads** 22 steps · calls a model · Discord, n8n data table](https://millionrounds.com/workflow/find-reply-worthy-hacker-news-and-stack-overflow-threads)
- [**Generate contextual recommendations from Slack with Pinecone** 22 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-contextual-recommendations-from-slack-with-pinecone)
