# Email cleaner with Gmail and WhatsApp: n8n workflow template

> Started by a clock, and works across Gmail and WhatsApp. 28 steps, 4 branches: large, and worth reading before you trust it with anything live.

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

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

# Email cleaner with Gmail and WhatsApp

Started by a clock, and works across Gmail and WhatsApp. 28 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Femail-cleaner-with-gmail-and-whatsapp)

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

**4** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 18 Service 9

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

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Get Spam Emails** Gmail *Service*
- 3 **Get Promotional Emails** Gmail *Service*
- 4 **Get Social Emails** Gmail *Service*
- 5 **Get Trash Emails** Gmail *Service*
- 6 **Process Spam** Code *Logic*
- 7 **Process Promotions** Code *Logic*
- 8 **Process Social** Code *Logic*
- 9 **Process Trash** Code *Logic*
- 10 **Has Spam to Delete?** If *Logic*
- 11 **Has Promotions to Delete?** If *Logic*
- 12 **Has Social to Delete?** If *Logic*
- 13 **Has Trash to Delete?** If *Logic*
- 14 **Spam Complete** Set *Logic*
- 15 **Bulk Delete Spam** Code *Logic*
- 16 **Promotions Complete** Set *Logic*
- 17 **Bulk Delete Promotions** Code *Logic*
- 18 **Social Complete** Set *Logic*
- 19 **Bulk Delete Social** Code *Logic*
- 20 **Trash Complete** Set *Logic*
- 21 **Bulk Delete Trash** Code *Logic*
- 22 **Combine All Results** Merge *Logic*
- 23 **Delete Spam Emails** Gmail *Service*
- 24 **Delete Promotional Emails** Gmail *Service*
- 25 **Delete Social Emails** Gmail *Service*
- 26 **Delete Trash Emails** Gmail *Service*
- 27 **Create Summary Report** Code *Logic*
- 28 **Send message** Whats App *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 28, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, WhatsApp
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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.

## 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%2Femail-cleaner-with-gmail-and-whatsapp)
- **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.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Triage AWS security posture changes with Claude and Slack** 28 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/triage-aws-security-posture-changes-with-claude-and-slack)
- [**Manage invoicing, collections and alerts with BeeL and HubSpot** 29 steps · Gmail, Google Drive](https://millionrounds.com/workflow/gestiona-facturacion-recobros-y-alertas-con-beel-hubspot-y)
- [**Monitor exposed secrets in GitHub and CI logs with WhatsApp** 27 steps · WhatsApp](https://millionrounds.com/workflow/monitor-exposed-secrets-in-github-and-ci-logs-with-whatsapp)
- [**Match teacher substitutes and send notifications with OpenAI** 29 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/match-teacher-substitutes-and-send-notifications-with-openai)
- [**Monitor brand mentions with OpenAI and Brave Search** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/monitor-brand-mentions-with-openai-and-brave-search)
- [**Monitor favorite YouTube channels with RSS** 29 steps · calls a model · Gmail, RSS](https://millionrounds.com/workflow/monitor-favorite-youtube-channels-with-rss)
