# Run A/B-tested email campaigns with Gmail and Google Sheets: n8n workflow

> Started by another system calling it, and works across Gmail, Google Sheets and Slack. 26 steps, 1 branch, 2 loops or waits: large, and worth reading before...

Source: https://millionrounds.com/workflow/run-a-b-tested-email-campaigns-with-gmail-and-google-sheets (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)

# Run A/B-tested email campaigns with Gmail and Google Sheets

Started by another system calling it, and works across Gmail, Google Sheets and Slack. 26 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Frun-a-b-tested-email-campaigns-with-gmail-and-google-sheets)

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

**1** Branch: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 4 Logic 11 Service 11

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

- 1 **Manual Trigger** Manual trigger *Starts it*
- 2 **Scheduled Trigger** Schedule trigger *Starts it*
- 3 **Webhook Trigger** Webhook *Starts it*
- 4 **Error Trigger** Error trigger *Starts it*
- 5 **Configure Campaign** Code *Logic*
- 6 **Format Error** Code *Logic*
- 7 **Read Contacts** Google Sheets *Service*
- 8 **Slack - Error Alert** Slack *Service*
- 9 **Filter and Validate** Code *Logic*
- 10 **Log Campaign Start** Google Sheets *Service*
- 11 **Slack - Campaign Started** Slack *Service*
- 12 **Has Contacts?** If *Logic*
- 13 **Extract Contacts** Code *Logic*
- 14 **Calculate Results** Code *Logic*
- 15 **Process in Batches** Split In Batches *Logic*
- 16 **Final Summary** Code *Logic*
- 17 **Prepare Email** Code *Logic*
- 18 **Update Campaign** Google Sheets *Service*
- 19 **Send Email** Gmail *Service*
- 20 **Slack - Campaign Completed** Slack *Service*
- 21 **Mark as Sent** Google Sheets *Service*
- 22 **Mark as Error** Google Sheets *Service*
- 23 **Done** No Op *Logic*
- 24 **Log Success** Google Sheets *Service*
- 25 **Log Error** Google Sheets *Service*
- 26 **Anti-Spam Delay** Wait *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 26, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Slack accounts. 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?

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 26 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 26 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%2Frun-a-b-tested-email-campaigns-with-gmail-and-google-sheets)
- **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)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

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

- [**Automate multi-step onboarding with Google Sheets and Gmail** 26 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-multi-step-onboarding-with-google-sheets-and-gmail)
- [**Monitor social account growth phases with Google Sheets** 26 steps · Google Sheets](https://millionrounds.com/workflow/monitor-social-account-growth-phases-with-google-sheets)
- [**Analyze customer feedback and alert negative sentiment** 26 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-customer-feedback-and-alert-negative-sentiment)
- [**Automated job scraping with Gemini** 26 steps · calls a model · Google Sheets, Outlook](https://millionrounds.com/workflow/automated-job-scraping-with-gemini)
- [**Singapore university eligibility analyzer with WordPress** 26 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/singapore-university-eligibility-analyzer-with-wordpress)
- [**Monitor HTTP endpoints and send state-change alerts** 25 steps · Google Sheets, Slack](https://millionrounds.com/workflow/monitor-http-endpoints-and-send-state-change-alerts)
