{
  "name": "Run A/B-tested email campaigns using Gmail, Google Sheets, and Slack",
  "nodes": [
    {
      "id": "a44f48be-93ff-41cc-afdf-2b43e6605334",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1456,
        -1136
      ]
    },
    {
      "id": "04e236ab-786c-47d8-8bb6-6765e78e2a79",
      "name": "Scheduled Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1456,
        -928
      ]
    },
    {
      "id": "f0d78564-b3c3-4739-9313-285fbbb019a0",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1456,
        -736
      ]
    },
    {
      "id": "8a5d6585-c5a0-4bbb-98c5-c988744356dc",
      "name": "Configure Campaign",
      "type": "n8n-nodes-base.code",
      "position": [
        -1120,
        -944
      ]
    },
    {
      "id": "e525ffa4-ed51-439a-aff5-79f1909656af",
      "name": "Read Contacts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -880,
        -944
      ]
    },
    {
      "id": "745aa533-3a91-4f2d-9bec-42e717b31cd7",
      "name": "Filter and Validate",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        -944
      ]
    },
    {
      "id": "18947fc1-e4f3-40c1-ac25-6a23b52950bb",
      "name": "Log Campaign Start",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -320,
        -1072
      ]
    },
    {
      "id": "0475ab01-0a9c-44c7-ad91-d56f13e5b3cc",
      "name": "Slack - Campaign Started",
      "type": "n8n-nodes-base.slack",
      "position": [
        -320,
        -864
      ]
    },
    {
      "id": "5a4cecc7-024d-4816-8e0c-8c6b442d84e8",
      "name": "Has Contacts?",
      "type": "n8n-nodes-base.if",
      "position": [
        0,
        -912
      ]
    },
    {
      "id": "9ce81cbd-f277-4456-9d53-3ca04871b7b6",
      "name": "Extract Contacts",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -1104
      ]
    },
    {
      "id": "45b1abf9-44e9-4555-beb6-3af669c66f44",
      "name": "Process in Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        544,
        -1104
      ]
    },
    {
      "id": "e37f2133-00ab-4b35-a35c-313d7b7d25a7",
      "name": "Prepare Email",
      "type": "n8n-nodes-base.code",
      "position": [
        784,
        -1104
      ]
    },
    {
      "id": "3f827ce6-859a-4e38-93d3-3c6eeba08678",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1024,
        -1104
      ]
    },
    {
      "id": "c56b051b-1983-4cfd-8df0-456617318e3e",
      "name": "Mark as Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1328,
        -1120
      ]
    },
    {
      "id": "edbd1dbb-af35-49bd-90b9-f69078271eb8",
      "name": "Mark as Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1328,
        -912
      ]
    },
    {
      "id": "713d5010-4403-4697-88d6-7d8eeeeb5a69",
      "name": "Log Success",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1568,
        -1120
      ]
    },
    {
      "id": "da20478c-52fc-4fcc-a9cc-a41a82fafe9d",
      "name": "Log Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1568,
        -912
      ]
    },
    {
      "id": "80c70256-8229-4859-ac47-64500c69fa1a",
      "name": "Anti-Spam Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        1808,
        -1008
      ]
    },
    {
      "id": "59fee3b4-a166-4c1a-b412-7d9ff4fc7e3e",
      "name": "Calculate Results",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        -528
      ]
    },
    {
      "id": "1ff96564-189f-4d05-9109-2ffb14637013",
      "name": "Final Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        -528
      ]
    },
    {
      "id": "10643128-6bc0-4f07-b46d-e1c828b0c022",
      "name": "Update Campaign",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        -528
      ]
    },
    {
      "id": "d5d81e23-862d-49da-8125-c7ca2c3b5e41",
      "name": "Slack - Campaign Completed",
      "type": "n8n-nodes-base.slack",
      "position": [
        1008,
        -528
      ]
    },
    {
      "id": "735a8545-39b3-40ac-b802-053df70c389d",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1424,
        -320
      ]
    },
    {
      "id": "2d208af5-d723-43ee-9638-1aa983e2ad02",
      "name": "Format Error",
      "type": "n8n-nodes-base.code",
      "position": [
        -1184,
        -320
      ]
    },
    {
      "id": "b2b9b3a5-31ef-4ed6-87a9-811ce1fa0bdb",
      "name": "Slack - Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -944,
        -320
      ]
    },
    {
      "id": "ae4a28d6-c710-4ed7-83ef-cf88684f371d",
      "name": "Done",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1248,
        -528
      ]
    },
    {
      "id": "dcc3f379-be58-475e-8468-29c2b65b1e72",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -1232
      ],
      "parameters": {
        "width": 400,
        "height": 632,
        "content": "## Send email campaigns with A/B testing using Gmail and Google Sheets\n\nEmail marketing with contact management, delivery tracking, and analytics.\n\n### How it works\n\n1. **Trigger** - Start manually, s"
      }
    },
    {
      "id": "07b54d1e-133f-4af1-b58e-c65cd1fa1a35",
      "name": "Triggers",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -1248
      ],
      "parameters": {
        "width": 260,
        "height": 664,
        "content": "## Campaign triggers\n\nManual, scheduled, or webhook."
      }
    },
    {
      "id": "6a461723-6ef2-471b-bc20-7f8cd3b56732",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -1248
      ],
      "parameters": {
        "width": 720,
        "height": 664,
        "content": "## Campaign setup\n\nLoads and validates contacts."
      }
    },
    {
      "id": "2a7db96c-c091-46de-ade1-4aad06de0a85",
      "name": "Logging",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        -1232
      ],
      "parameters": {
        "width": 280,
        "height": 650,
        "content": "## Logging\n\nLogs start to Sheets and Slack."
      }
    },
    {
      "id": "2b841651-80d5-43b4-9c3e-01253da48310",
      "name": "Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -1232
      ],
      "parameters": {
        "width": 260,
        "height": 648,
        "content": "## Validation\n\nChecks for valid contacts."
      }
    },
    {
      "id": "a64e4fe2-f8fb-4cd9-af8e-e2d905b26cb5",
      "name": "Delivery",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -1232
      ],
      "parameters": {
        "width": 920,
        "height": 488,
        "content": "## Email delivery\n\nSends in batches with delays."
      }
    },
    {
      "id": "1c5eb0ea-2eff-4947-a03a-6871c423d6c9",
      "name": "Tracking",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -1232
      ],
      "parameters": {
        "width": 776,
        "height": 490,
        "content": "## Send tracking\n\nTracks results and handles delays."
      }
    },
    {
      "id": "b11a7e14-f45c-429b-aaf4-9a1644a4d828",
      "name": "Completion",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -720
      ],
      "parameters": {
        "width": 1240,
        "height": 400,
        "content": "## Campaign completion\n\nCalculates stats and notifies team."
      }
    },
    {
      "id": "2035cf03-f7df-4580-89a4-3c3412f2683d",
      "name": "Errors",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1456,
        -432
      ],
      "parameters": {
        "width": 744,
        "height": 264,
        "content": "## Error handling\n\nAlerts team on Slack."
      }
    }
  ],
  "connections": {
    "Log Error": {
      "main": [
        [
          {
            "node": "Anti-Spam Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "main": [
        [
          {
            "node": "Mark as Sent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Success": {
      "main": [
        [
          {
            "node": "Anti-Spam Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error": {
      "main": [
        [
          {
            "node": "Slack - Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Sent": {
      "main": [
        [
          {
            "node": "Log Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Format Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Summary": {
      "main": [
        [
          {
            "node": "Update Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Contacts?": {
      "main": [
        [
          {
            "node": "Extract Contacts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Calculate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Error": {
      "main": [
        [
          {
            "node": "Log Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Email": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Contacts": {
      "main": [
        [
          {
            "node": "Filter and Validate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Configure Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anti-Spam Delay": {
      "main": [
        [
          {
            "node": "Process in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Campaign": {
      "main": [
        [
          {
            "node": "Slack - Campaign Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Configure Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Contacts": {
      "main": [
        [
          {
            "node": "Process in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Results": {
      "main": [
        [
          {
            "node": "Final Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scheduled Trigger": {
      "main": [
        [
          {
            "node": "Configure Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Campaign": {
      "main": [
        [
          {
            "node": "Read Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Campaign Start": {
      "main": [
        [
          {
            "node": "Slack - Campaign Started",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process in Batches": {
      "main": [
        [
          {
            "node": "Prepare Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Final Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter and Validate": {
      "main": [
        [
          {
            "node": "Log Campaign Start",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Campaign Started": {
      "main": [
        [
          {
            "node": "Has Contacts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack - Campaign Completed": {
      "main": [
        [
          {
            "node": "Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}