{
  "name": "Add MailPoet subscribers from WordPress forms via TWZ plugin and log to Google Sheets",
  "nodes": [
    {
      "id": "0f34145b-5db5-4e52-b962-02cf053ec86f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -576
      ],
      "parameters": {
        "width": null,
        "height": 464,
        "content": "## Trigger: Form Submission\nThis node listens to your WordPress form submission.\nIt collects the following fields:\n- First Name\n- Last Name\n- Email"
      }
    },
    {
      "id": "7538d4ed-08ff-4723-87f7-325e57b537b3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -576
      ],
      "parameters": {
        "width": 384,
        "height": 464,
        "content": "## Check Existing Subscribers\nThis node checks your Google Sheet or MailPoet API to see if the subscriber already exists.\nThis helps avoid duplicate entries in MailPoet."
      }
    },
    {
      "id": "b7cef22a-f80d-44b7-9b27-0bb25d671a9d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -576
      ],
      "parameters": {
        "width": 864,
        "height": 464,
        "content": "## Conditional Branch: IF Node\n- If subscriber does not exist → Add subscriber via HTTP Request node\n- If subscriber exists → Skip to completion message\nThis ensures that new users are only added once"
      }
    },
    {
      "id": "f13b3492-d54f-420d-9fef-15797fc1bd97",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        -576
      ],
      "parameters": {
        "width": 304,
        "height": 464,
        "content": "## Logging & Completion\n- Sends the completion message to the user (“Thank you for your review!”)\nOptional: Add Slack notification or email alert to the admin."
      }
    },
    {
      "id": "cc21e6a3-4356-4f4e-a55e-a410922f3cfb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -912
      ],
      "parameters": {
        "width": 1872,
        "height": 288,
        "content": "## Workflow Overview\nThis workflow automates the full subscriber management process:\n\n1. Trigger: WordPress form submission\n2. Check if subscriber exists\n3. Add new subscriber via TWZ MailPoet API\n4. "
      }
    },
    {
      "id": "f4f93433-be9c-4a32-80bf-9cfe85812c62",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -480,
        -272
      ]
    },
    {
      "id": "0ad71acb-2e27-4991-85ac-d1d860d9835a",
      "name": "Check If Subscriber Already Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -32,
        -272
      ]
    },
    {
      "id": "25738522-5d2b-478d-81cb-c711fa3b800c",
      "name": "Get Subscriber From  MailPoet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        -352
      ]
    },
    {
      "id": "40aeed39-bd91-474b-9f09-bed303d68cc7",
      "name": "Check If Subscriber Exists In MailPoet",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        -352
      ]
    },
    {
      "id": "ba882216-b693-4371-97c5-bb14ece26d3a",
      "name": "Add Subscriber to MailPoet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        -416
      ]
    },
    {
      "id": "e8637c40-735a-40b8-8b74-c4a8f13fdaaa",
      "name": "Check Google Sheet for Existing Subscriber",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -256,
        -272
      ]
    },
    {
      "id": "97254e6e-cc98-454f-8f9e-719298b0c777",
      "name": "Completion Message to User",
      "type": "n8n-nodes-base.form",
      "position": [
        1136,
        -272
      ]
    },
    {
      "id": "1be3ff3d-7493-49e8-bd3f-af53dd5addd1",
      "name": "Log Subscriber to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        864,
        -416
      ]
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Check Google Sheet for Existing Subscriber",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Subscriber to MailPoet": {
      "main": [
        [
          {
            "node": "Log Subscriber to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Completion Message to User": {
      "main": [
        []
      ]
    },
    "Get Subscriber From  MailPoet": {
      "main": [
        [
          {
            "node": "Check If Subscriber Exists In MailPoet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Subscriber to Google Sheet": {
      "main": [
        [
          {
            "node": "Completion Message to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Subscriber Already Exists": {
      "main": [
        [
          {
            "node": "Get Subscriber From  MailPoet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Completion Message to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Subscriber Exists In MailPoet": {
      "main": [
        [
          {
            "node": "Add Subscriber to MailPoet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Completion Message to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Google Sheet for Existing Subscriber": {
      "main": [
        [
          {
            "node": "Check If Subscriber Already Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}