Skip to main content

Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack

Workflow preview

Workflow preview
100%
Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Run professional email campaigns with A/B testing, Google Sheets tracking, and Slack analytics. FEATURES: A/B testing with automatic 50/50 split Email validation and deduplication Batch processing ...

Best for

  • Social Media automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.scheduletrigger, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.slack, n8n-nodes-base.if, n8n-nodes-base.splitinbatches

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Manu.

Original n8n.io source

1.1 Workflow description

Title
Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack
Workflow name
Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack

Run professional email campaigns with A/B testing, Google Sheets tracking, and Slack analytics. FEATURES:

A/B testing with automatic 50/50 split Email validation and deduplication Batch processing with anti-spam delays Professional HTML email templates Complete campaign tracking and logging Real-time Slack notifications

WORKFLOW:

Trigger campaign (manual, scheduled Monday 9AM, or webhook) Read and validate contacts from Google Sheets Assign A/B variants automatically Send personalized HTML emails via Gmail Log results and update contact status Slack notifications on start/completion/errors

SETUP:

Create Google Sheet with 4 tabs:

Contacts: name, email, segment, sent, unsubscribed, sent_date, campaign, variant, error_msg Campaigns: Campaign ID, Name, Start Date, Total Contacts, Valid, Invalid, Already Sent, Unsubscribed, Variant A, Variant B, Status, End Date, Duration Send Log: Timestamp, Campaign ID, Email, Name, Variant, Subject, Status Metrics: Campaign ID, Opens, Clicks, Unsubscribes

Replace YOUR_DOCUMENT_ID in all Sheets nodes Connect Gmail credentials Connect Slack (#marketing, #errors channels)

CUSTOMIZABLE:

Company name, colors, logo in Configure Campaign node Email content and design in Prepare Email node A/B test subjects Batch size and delays

IDEAL FOR: Newsletters, product launches, marketing campaigns, announcements, and any bulk email needs.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Manual Trigger

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Scheduled Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 3 - Webhook Trigger

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 4 - Configure Campaign

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Read Contacts

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 6 - Filter and Validate

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Log Campaign Start

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 8 - Slack - Campaign Started

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 9 - Has Contacts?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 10 - Extract Contacts

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Process in Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 12 - Prepare Email

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Send Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 14 - Mark as Sent

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 15 - Mark as Error

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 16 - Log Success

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 17 - Log Error

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 18 - Anti-Spam Delay

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 19 - Calculate Results

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Final Summary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Update Campaign

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 22 - Slack - Campaign Completed

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 23 - Error Trigger

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 24 - Format Error

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 35 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack
Complexity advanced
Nodes 35
Categories Social Media
Author Manu
Published 23 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12080/12080.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack do?

Run professional email campaigns with A/B testing, Google Sheets tracking, and Slack analytics. FEATURES: A/B testing with automatic 50/50 split Email validation and deduplication Batch processing ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media use case.